Advertisement
Guest User

Untitled

a guest
Apr 9th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #version 330 core
  2.  
  3. in vec2 UV;
  4. in vec3 normal;
  5.  
  6. out vec3 color;
  7.  
  8. uniform sampler2D textureSampler;
  9.  
  10. void main() {
  11.     color = texture(textureSampler, UV).rgb * (0.3 + 0.7 * max(dot(normal, vec3(1, 1, 1)), 0.0));
  12.    
  13.     // Doom 3 lighting
  14.     // color = texture(textureSampler, UV).rgb * max(dot(normal, vec3(1, 1, 1)), 0.0);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement