/Resources/shaders/pointLighting.fsh
http://github.com/tartiflop/ojgl · Fragment Shader File · 19 lines · 14 code · 5 blank · 0 comment · 2 complexity · f6c2ee1fb69a1afe2b306a52f0094d16 MD5 · raw file
- varying vec4 v_color;
- varying vec4 v_specular;
- varying vec2 v_texCoord;
- uniform sampler2D s_texture;
- uniform bool u_useTexture;
- void main() {
- vec4 color;
- if (u_useTexture) {
- color = texture2D(s_texture, v_texCoord) * v_color;
- } else {
- color = v_color;
- }
- gl_FragColor = color + v_specular;
- }