zworld/assets/shaders/shadow.fs.glsl
2024-01-14 22:56:06 +08:00

14 lines
245 B
GLSL

#version 450
#extension GL_GOOGLE_include_directive : enable
#include "lib/common.glsl"
#include "lib/lighting.glsl"
IN(0, float, depth)
void main()
{
// exponential depth
gl_FragDepth = exp(SHADOW_POWER * in_depth) / exp(SHADOW_POWER);
}