GameObjects
Began to add GameObjects, starting with the player.
This commit is contained in:
15
point_shadow_depth.frag
Normal file
15
point_shadow_depth.frag
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user