瀏覽代碼

Fix missing param with skyMode = Env and skyMap is null

ShiroSmith 5 年之前
父節點
當前提交
90d6cfe6b4
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      h3d/scene/pbr/Renderer.hx

+ 4 - 0
h3d/scene/pbr/Renderer.hx

@@ -383,6 +383,10 @@ class Renderer extends h3d.scene.Renderer {
 					pbrIndirect.gammaCorrect = true;
 					null;
 				};
+
+				if( pbrIndirect.skyMap == null && pbrIndirect.showSky && !pbrIndirect.skyColor )
+					pbrIndirect.showSky = false;
+
 			case LightProbe:
 				pbrIndirect.drawIndirectDiffuse = false;
 				pbrIndirect.drawIndirectSpecular = false;