Files
vb01/depthMap.frag
T
devZoGok c7940f7280 Revert "animatable textures"
This reverts commit 8226a9479ce8ab45bed5bc6acbba63eaaf0e6330.

point light shadows
fixed spotlights
geometry shaders
2021-10-19 19:06:40 +03:00

16 lines
217 B
GLSL

#version 330 core
uniform float farPlane;
uniform bool point;
uniform vec3 lightPos;
in vec4 fragPos;
void main(){
if(point){
float dist=length(lightPos-fragPos.xyz);
dist/=farPlane;
gl_FragDepth=dist;
}
}