glstuff

experiments with opengl2/ogles2/sdl
git clone http://frotz.net/git/glstuff.git
Log | Files | Refs

test4.fs (225B)


      1 uniform sampler2D uTexture;
      2 varying vec2 vTexCoord;
      3 
      4 void main() {
      5 	float mask = texture2D(uTexture, vTexCoord).a;
      6 
      7 	if (mask < 0.471)
      8 		discard;
      9 
     10 	float c = smoothstep(mask, 0.47, 0.49);
     11 
     12 	gl_FragColor = vec4(c, c, c, 1);
     13 }