PBRLighting Uses the world normal fetched from the texture...

This commit is contained in:
Nehon 2016-03-26 10:47:49 +01:00
parent 65a8ee0f2e
commit 7190da4df0

View File

@ -214,7 +214,7 @@ void main(){
vec3 indirectDiffuse = vec3(0.0); vec3 indirectDiffuse = vec3(0.0);
vec3 indirectSpecular = vec3(0.0); vec3 indirectSpecular = vec3(0.0);
indirectDiffuse = textureCube(g_IrradianceMap, wNormal.xyz).rgb * diffuseColor.rgb; indirectDiffuse = textureCube(g_IrradianceMap, normal.xyz).rgb * diffuseColor.rgb;
indirectSpecular = ApproximateSpecularIBLPolynomial(g_PrefEnvMap, specularColor.rgb, Roughness, ndotv, rv.xyz); indirectSpecular = ApproximateSpecularIBLPolynomial(g_PrefEnvMap, specularColor.rgb, Roughness, ndotv, rv.xyz);
indirectSpecular *= vec3(horiz); indirectSpecular *= vec3(horiz);