mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
from tim: no need for mip for the diffuse contribution. the prefilter handles that
This commit is contained in:
parent
ead78ec588
commit
5165d9c868
1 changed files with 2 additions and 4 deletions
|
|
@ -99,8 +99,7 @@ float3 iblBoxDiffuse(Surface surface, ProbeData probe)
|
||||||
{
|
{
|
||||||
float3 dir = boxProject(surface, probe);
|
float3 dir = boxProject(surface, probe);
|
||||||
|
|
||||||
float lod = surface.roughness*cubeMips;
|
float3 color = TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, dir, probe.probeIdx,0).xyz;
|
||||||
float3 color = TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, dir, probe.probeIdx, lod).xyz;
|
|
||||||
if (probe.contribution>0)
|
if (probe.contribution>0)
|
||||||
return color*probe.contribution;
|
return color*probe.contribution;
|
||||||
else
|
else
|
||||||
|
|
@ -131,8 +130,7 @@ float3 iblBoxSpecular(Surface surface, ProbeData probe)
|
||||||
|
|
||||||
float3 iblSkylightDiffuse(Surface surface, ProbeData probe)
|
float3 iblSkylightDiffuse(Surface surface, ProbeData probe)
|
||||||
{
|
{
|
||||||
float lod = surface.roughness*cubeMips;
|
float3 color = TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, surface.R, probe.probeIdx, 0).xyz;
|
||||||
float3 color = TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, surface.R, probe.probeIdx, lod).xyz;
|
|
||||||
|
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue