Skip to content

Commit 16082fa

Browse files
authored
Clean up (#31671)
1 parent b963942 commit 16082fa

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@ export default /* glsl */`
6565
6666
#endif
6767
68-
/*
69-
#if NUM_RECT_AREA_LIGHTS > 0
70-
71-
// TODO (abelnation): create uniforms for area light shadows
72-
73-
#endif
74-
*/
75-
7668
float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
7769
7870
float depth = unpackRGBAToDepth( texture2D( depths, uv ) );
@@ -95,25 +87,25 @@ export default /* glsl */`
9587
9688
}
9789
98-
float VSMShadow (sampler2D shadow, vec2 uv, float compare ){
90+
float VSMShadow( sampler2D shadow, vec2 uv, float compare ) {
9991
10092
float occlusion = 1.0;
10193
10294
vec2 distribution = texture2DDistribution( shadow, uv );
10395
10496
#ifdef USE_REVERSED_DEPTH_BUFFER
10597
106-
float hard_shadow = step( distribution.x, compare ); // Hard Shadow
98+
float hard_shadow = step( distribution.x, compare );
10799
108100
#else
109101
110-
float hard_shadow = step( compare , distribution.x ); // Hard Shadow
102+
float hard_shadow = step( compare, distribution.x );
111103
112104
#endif
113105
114-
if (hard_shadow != 1.0 ) {
106+
if ( hard_shadow != 1.0 ) {
115107
116-
float distance = compare - distribution.x ;
108+
float distance = compare - distribution.x;
117109
float variance = max( 0.00000, distribution.y * distribution.y );
118110
float softness_probability = variance / (variance + distance * distance ); // Chebeyshevs inequality
119111
softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); // 0.3 reduces light bleed

0 commit comments

Comments
 (0)