File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed
Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -206,12 +206,25 @@ class LightShadow {
206206 _projScreenMatrix . multiplyMatrices ( shadowCamera . projectionMatrix , shadowCamera . matrixWorldInverse ) ;
207207 this . _frustum . setFromProjectionMatrix ( _projScreenMatrix ) ;
208208
209- shadowMatrix . set (
210- 0.5 , 0.0 , 0.0 , 0.5 ,
211- 0.0 , 0.5 , 0.0 , 0.5 ,
212- 0.0 , 0.0 , 0.5 , 0.5 ,
213- 0.0 , 0.0 , 0.0 , 1.0
214- ) ;
209+ if ( shadowCamera . reversedDepth ) {
210+
211+ shadowMatrix . set (
212+ 0.5 , 0.0 , 0.0 , 0.5 ,
213+ 0.0 , 0.5 , 0.0 , 0.5 ,
214+ 0.0 , 0.0 , 1.0 , 0.0 ,
215+ 0.0 , 0.0 , 0.0 , 1.0
216+ ) ;
217+
218+ } else {
219+
220+ shadowMatrix . set (
221+ 0.5 , 0.0 , 0.0 , 0.5 ,
222+ 0.0 , 0.5 , 0.0 , 0.5 ,
223+ 0.0 , 0.0 , 0.5 , 0.5 ,
224+ 0.0 , 0.0 , 0.0 , 1.0
225+ ) ;
226+
227+ }
215228
216229 shadowMatrix . multiply ( _projScreenMatrix ) ;
217230
You can’t perform that action at this time.
0 commit comments