Browse Source

Fix spot light baking

trethaller 6 years ago
parent
commit
e30d575e33
1 changed files with 5 additions and 0 deletions
  1. 5 0
      h3d/scene/pbr/SpotLight.hx

+ 5 - 0
h3d/scene/pbr/SpotLight.hx

@@ -125,6 +125,11 @@ class SpotLight extends Light {
 	var s = new h3d.col.Sphere();
 	var d = new h3d.Vector();
 	override function emit(ctx:RenderContext) {
+		if( ctx.computingStatic ) {
+			super.emit(ctx);
+			return;
+		}
+
 		if( ctx.pbrLightPass == null )
 			throw "Rendering a pbr light require a PBR compatible scene renderer";