take ambient occlusion into account for probe and skylight projections as well, given they are litterally an ambient source

This commit is contained in:
Azaezel 2018-10-17 21:34:09 -05:00
parent 4541a9d4a8
commit 861da2ba2d
4 changed files with 9 additions and 2 deletions

View file

@ -210,4 +210,7 @@ void main()
vec3 surfToEye = normalize(worldPos.xyz-eyePosWorld.xyz);
OUT_col = vec4(iblBoxDiffuse(wsNormal, worldPos, irradianceCubemap, probeWSPos, bbMin, bbMax), blendVal);
OUT_col1 = vec4(iblBoxSpecular(wsNormal, worldPos, 1.0 - matInfo.b, surfToEye, BRDFTexture, cubeMap, probeWSPos, bbMin, bbMax), blendVal);
OUT_col *= matInfo.g;
OUT_col1 *= matInfo.g;
}

View file

@ -82,4 +82,6 @@ void main()
OUT_col = vec4(irradiance.rgb, 1);
OUT_col1 = vec4(specular.rgb, 1);
OUT_col *= matInfo.g;
OUT_col1 *= matInfo.g;
}

View file

@ -207,6 +207,7 @@ PS_OUTPUT main( ConvexConnectP IN )
float3 surfToEye = normalize(worldPos.xyz-eyePosWorld.xyz);
Output.diffuse = float4(iblBoxDiffuse(wsNormal, worldPos, TORQUE_SAMPLERCUBE_MAKEARG(irradianceCubemap), probeWSPos, bbMin, bbMax), blendVal);
Output.spec = float4(iblBoxSpecular(wsNormal, worldPos, 1.0 - matInfo.b, surfToEye, TORQUE_SAMPLER2D_MAKEARG(BRDFTexture), TORQUE_SAMPLERCUBE_MAKEARG(cubeMap), probeWSPos, bbMin, bbMax), blendVal);
Output.diffuse *= matInfo.g;
Output.spec *= matInfo.g;
return Output;
}

View file

@ -139,7 +139,8 @@ PS_OUTPUT main( ConvexConnectP IN )
Output.diffuse = float4(irradiance.rgb, 1);
Output.spec = float4(specular.rgb, 1);
Output.diffuse *= matInfo.g;
Output.spec *= matInfo.g;
return Output;
}