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 {
206
206
_projScreenMatrix . multiplyMatrices ( shadowCamera . projectionMatrix , shadowCamera . matrixWorldInverse ) ;
207
207
this . _frustum . setFromProjectionMatrix ( _projScreenMatrix ) ;
208
208
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
+ }
215
228
216
229
shadowMatrix . multiply ( _projScreenMatrix ) ;
217
230
You can’t perform that action at this time.
0 commit comments