Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vec3 cube_space_vector = (gl_FragCoord - (fragposition * depthMVP)).xyz;
- float dist = texture(shadowmap, cube_space_vector).x;
- float shadowfactor = 1.0;
- if (length(cube_space_vector) > dist)
- shadowfactor = 0.5;
- outColour = texture(tex, fragtexcoord) * shadowfactor;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement