DSDSWeb/static/js/Cesium-1.53/Source/Shaders/Builtin/Functions/cascadeWeights.glsl

11 lines
297 B
GLSL

uniform vec4 shadowMap_cascadeSplits[2];
vec4 czm_cascadeWeights(float depthEye)
{
// One component is set to 1.0 and all others set to 0.0.
vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));
vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);
return near * far;
}