begin network integration
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / vg / standard.fs.glsl
1 out vec4 FragColor;
2
3 uniform sampler2D uTexMain;
4 uniform vec4 uColour;
5
6 in vec4 aColour;
7 in vec2 aUv;
8 in vec3 aNorm;
9 in vec3 aCo;
10
11 void main()
12 {
13 vec3 diffuse = texture( uTexMain, aUv ).rgb;
14 float light1 = max(0.0,dot(-vec3(0.5,-0.8,0.25), aNorm));
15 float light2 = max(0.0,dot(-vec3(-0.8,0.5,-0.25), aNorm));
16 diffuse += vec3(0.2,0.2,0.2) +
17 vec3(1.0,1.0,0.9)*light1 +
18 vec3(0.1,0.3,0.4)*light2;
19 FragColor = vec4(diffuse*uColour.rgb, aColour.a*uColour.a);
20 }