fork download
  1. //TriangleShaderFS
  2. precision mediump float;
  3. varying vec2 v_uv;
  4.  
  5. uniform sampler2D u_s_texture;
  6. uniform sampler2D u_s_texture2;
  7. uniform sampler2D mask;
  8.  
  9.  
  10. void main()
  11. {
  12.  
  13. vec4 texel0, texel1, texel2, resultColor;
  14. texel0 = texture2D(u_s_texture, v_uv);
  15. texel1 = texture2D(u_s_texture2, v_uv);
  16. texel2 = texture2D(mask, v_uv);
  17.  
  18. //gl_FragColor = texture2D(u_s_texture, v_uv);
  19. gl_FragColor = mix (texel0, texel1, texel2.a);
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:1: error: ‘precision’ does not name a type
 precision mediump float;
 ^
prog.cpp:3:1: error: ‘varying’ does not name a type
 varying vec2 v_uv;
 ^
prog.cpp:4:1: error: ‘uniform’ does not name a type
 uniform sampler2D u_s_texture;
 ^
prog.cpp:5:11: error: ‘::main’ must return ‘int’
 void main()  
           ^
prog.cpp: In function ‘int main()’:
prog.cpp:7:1: error: ‘gl_FragColor’ was not declared in this scope
 gl_FragColor = texture2D(u_s_texture, v_uv);
 ^
prog.cpp:7:26: error: ‘u_s_texture’ was not declared in this scope
 gl_FragColor = texture2D(u_s_texture, v_uv);
                          ^
prog.cpp:7:39: error: ‘v_uv’ was not declared in this scope
 gl_FragColor = texture2D(u_s_texture, v_uv);
                                       ^
prog.cpp:7:43: error: ‘texture2D’ was not declared in this scope
 gl_FragColor = texture2D(u_s_texture, v_uv);
                                           ^
stdout
Standard output is empty