Explorar o código

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

BearishSun %!s(int64=8) %!d(string=hai) anos
pai
achega
1afabec9d0
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      Source/RenderBeast/BsImageBasedLighting.cpp

+ 4 - 2
Source/RenderBeast/BsImageBasedLighting.cpp

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