mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-16 21:23:46 +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);
|
||||
|
||||
float lod = surface.roughness*cubeMips;
|
||||
float3 color = TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, dir, probe.probeIdx, lod).xyz;
|
||||
float3 color = TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, dir, probe.probeIdx,0).xyz;
|
||||
if (probe.contribution>0)
|
||||
return color*probe.contribution;
|
||||
else
|
||||
|
|
@ -131,8 +130,7 @@ float3 iblBoxSpecular(Surface surface, ProbeData probe)
|
|||
|
||||
float3 iblSkylightDiffuse(Surface surface, ProbeData probe)
|
||||
{
|
||||
float lod = surface.roughness*cubeMips;
|
||||
float3 color = TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, surface.R, probe.probeIdx, lod).xyz;
|
||||
float3 color = TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, surface.R, probe.probeIdx, 0).xyz;
|
||||
|
||||
return color;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue