mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-14 04:03:46 +00:00
take ambient occlusion into account for probe and skylight projections as well, given they are litterally an ambient source
This commit is contained in:
parent
4541a9d4a8
commit
861da2ba2d
4 changed files with 9 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue