Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cubemap.frag 405B

123456789101112131415161718
  1. // Fragment shader for cube-texture reflection mapping
  2. // Brian Paul
  3. uniform samplerCube cubeTex;
  4. varying vec3 normal;
  5. uniform vec3 lightPos;
  6. void main()
  7. {
  8. // simple diffuse, specular lighting:
  9. vec3 lp = normalize(lightPos);
  10. float dp = dot(lp, normalize(normal));
  11. float spec = pow(dp, 5.0);
  12. // final color:
  13. gl_FragColor = dp * textureCube(cubeTex, gl_TexCoord[0].xyz, 0.0) + spec;
  14. }