• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1varying vec3 varWorldPos;
2varying vec3 varWorldNormal;
3varying vec2 varTex0;
4
5void main() {
6
7   vec3 V = normalize(UNI_cameraPos.xyz - varWorldPos.xyz);
8   vec3 worldNorm = (varWorldNormal);
9
10   vec3 light0Vec = V;
11   vec3 light0R = reflect(light0Vec, worldNorm);
12   float light0_Diffuse = dot(worldNorm, light0Vec);
13
14   vec2 t0 = varTex0.xy;
15   lowp vec4 col = texture2D(UNI_diffuse, t0).rgba;
16   col.xyz = col.xyz * light0_Diffuse * 1.2;
17   gl_FragColor = col;
18}
19
20