Project

General

Profile

« Previous | Next » 

Revision ff8ad0a7

Added by Leszek Koltunski almost 8 years ago

Fix for Bug #16: When rotated at an angle, surfaces get increasingly transparent.

This also fixes the saturation, chroma, alpha + contrast effects, while completely breaking macroblocks :)

View differences:

src/main/res/raw/main_fragment_shader.glsl
92 92
void main()                    		
93 93
  {  
94 94
  vec2 tex = v_TexCoordinate;
95
  vec4 col = vec4(1.0,1.0,1.0,1.0);
95
  vec4 col = texture2D(u_Texture, tex);
96 96

  
97 97
#if NUM_FRAGMENT>0
98 98
  vec2 diff;
......
116 116
    else if( fType[i]==SMOOTH_SATURATION ) saturation(     pointDegree ,2*i,col);
117 117
    }
118 118
#endif
119
 
120
  gl_FragColor = (col * 0.5 * (v_Normal.z+1.0) * texture2D(u_Texture, tex));
119

  
120
  gl_FragColor = vec4(col.rgb * 0.5 * (v_Normal.z+1.0), col.a);
121 121
  }

Also available in: Unified diff