mirror of
https://github.com/ApfelTeeSaft/vb01.git
synced 2026-08-26 19:33:45 +00:00
This reverts commit 8226a9479ce8ab45bed5bc6acbba63eaaf0e6330. point light shadows fixed spotlights geometry shaders
16 lines
217 B
GLSL
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;
|
|
}
|
|
}
|