PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1varying vec4 v_color;
 2varying vec4 v_specular;
 3varying vec2 v_texCoord;
 4
 5uniform sampler2D s_texture;
 6uniform bool u_useTexture;
 7
 8
 9void main() {
10	vec4 color;
11	if (u_useTexture) {
12		color = texture2D(s_texture, v_texCoord) * v_color;
13	} else {
14		color = v_color;
15	}
16	gl_FragColor = color + v_specular;
17}
18 
19