Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #version 330
  2.  
  3. uniform vec4 color;
  4. uniform vec3 lightPosition;
  5. uniform vec3 lightColor;
  6. uniform vec3 diffuseLight;
  7. uniform float distanceEffect;
  8.  
  9. in vec3 smoothNormal;
  10. in vec3 smoothPosition;
  11.  
  12. out vec4 resultColor;
  13.  
  14. void main()
  15. {
  16.     /*vec3 direction = normalize(lightPosition - smoothPosition);
  17.     float angleCos = max(dot(direction, normalize(smoothNormal)), 0.0f);
  18.     angleCos /= distance(lightPosition, smoothPosition) * distanceEffect;
  19.     vec3 light = angleCos * lightColor + diffuseLight;
  20.  
  21.     resultColor = vec4(light * color.rgb, color.a);*/
  22.  
  23.     resultColor = color;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement