소스 검색

WIP: Getting OpenGL up to date
- Fixing warnings for missing texture parameters when SSR or AO effects are disabled

BearishSun 8 년 전
부모
커밋
1afabec9d0
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      Source/RenderBeast/BsImageBasedLighting.cpp

+ 4 - 2
Source/RenderBeast/BsImageBasedLighting.cpp

@@ -121,10 +121,12 @@ namespace bs { namespace ct
 		}
 
 		// AO
-		params->getTextureParam(programType, "gAmbientOcclusionTex", ambientOcclusionTexParam);
+		if(params->hasTexture(programType, "gAmbientOcclusionTex"))
+			params->getTextureParam(programType, "gAmbientOcclusionTex", ambientOcclusionTexParam);
 
 		// SSR
-		params->getTextureParam(programType, "gSSRTex", ssrTexParam);
+		if(params->hasTexture(programType, "gSSRTex"))
+			params->getTextureParam(programType, "gSSRTex", ssrTexParam);
 
 		if(gridIndices)
 		{