Advertisement
Guest User

Untitled

a guest
Dec 31st, 2012
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1.         vec3 cube_space_vector = (gl_FragCoord - (fragposition * depthMVP)).xyz;
  2.     float dist = texture(shadowmap, cube_space_vector).x;
  3.    
  4.     float shadowfactor = 1.0;
  5.    
  6.     if (length(cube_space_vector) > dist)
  7.         shadowfactor = 0.5;
  8.        
  9.     outColour = texture(tex, fragtexcoord) * shadowfactor;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement