|
@@ -188,11 +188,6 @@ class DirShadowMap extends Shadows {
|
|
|
|
|
|
override function setGlobals() {
|
|
|
super.setGlobals();
|
|
|
- if( mode != Mixed || ctx.computingStatic ) {
|
|
|
- lightCamera.orthoBounds.empty();
|
|
|
- calcShadowBounds(lightCamera);
|
|
|
- lightCamera.update();
|
|
|
- }
|
|
|
cameraViewProj = getShadowProj();
|
|
|
}
|
|
|
|
|
@@ -277,6 +272,12 @@ class DirShadowMap extends Shadows {
|
|
|
if( !filterPasses(passes) )
|
|
|
return;
|
|
|
|
|
|
+ if( mode != Mixed || ctx.computingStatic ) {
|
|
|
+ lightCamera.orthoBounds.empty();
|
|
|
+ calcShadowBounds(lightCamera);
|
|
|
+ lightCamera.update();
|
|
|
+ }
|
|
|
+
|
|
|
cullPasses(passes,function(col) return col.inFrustum(lightCamera.frustum));
|
|
|
|
|
|
var texture = ctx.textures.allocTarget("dirShadowMap", size, size, false, format);
|