This repository has been archived on 2025-03-10. You can view files and clone it, but cannot push or open issues or pull requests.
NFRev1/NothinFancy/assets/base/shaders/shadow/pointShadowFragment.shader
Grayson Riffe (Laptop) b4c704f5ec Basic physics with boxes
2021-10-25 00:40:44 -05:00

12 lines
187 B
GLSL

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