瀏覽代碼

Fix spot light baking

trethaller 6 年之前
父節點
當前提交
e30d575e33
共有 1 個文件被更改,包括 5 次插入0 次删除
  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";