mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
16 lines
225 B
GLSL
16 lines
225 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;
|
|
}
|
|
}
|