Files
LearningOpenGL/point_shadow_depth.frag
onTheZero 4bf6b02255 GameObjects
Began to add GameObjects, starting with the player.
2025-08-13 00:59:03 -04:00

15 lines
246 B
GLSL

#version 330
in vec4 FragPosition;
uniform vec3 lightPosition;
uniform float farPlane;
void main()
{
float lightDistance = length(FragPosition.xyz - lightPosition);
lightDistance = lightDistance / farPlane;
gl_FragDepth = lightDistance;
}