소스 검색

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;