mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
cleanups. don't really want to be multiplying the color itsself by contribution ammount
This commit is contained in:
parent
2c1a786e23
commit
f01c41a899
1 changed files with 3 additions and 5 deletions
|
|
@ -101,7 +101,7 @@ float3 iblBoxDiffuse(Surface surface, ProbeData probe)
|
||||||
|
|
||||||
float3 color = TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, dir, probe.probeIdx,0).xyz;
|
float3 color = TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, dir, probe.probeIdx,0).xyz;
|
||||||
if (probe.contribution>0)
|
if (probe.contribution>0)
|
||||||
return color*probe.contribution;
|
return color;
|
||||||
else
|
else
|
||||||
return float3(0, 0, 0);
|
return float3(0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
@ -123,7 +123,7 @@ float3 iblBoxSpecular(Surface surface, ProbeData probe)
|
||||||
float3 color = TORQUE_TEXCUBEARRAYLOD(cubeMapAR, dir, probe.probeIdx, lod).xyz * (brdf.x + brdf.y);
|
float3 color = TORQUE_TEXCUBEARRAYLOD(cubeMapAR, dir, probe.probeIdx, lod).xyz * (brdf.x + brdf.y);
|
||||||
|
|
||||||
if (probe.contribution>0)
|
if (probe.contribution>0)
|
||||||
return color*probe.contribution;
|
return color;
|
||||||
else
|
else
|
||||||
return float3(0, 0, 0);
|
return float3(0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
@ -242,8 +242,6 @@ float4 main( PFXVertToPix IN ) : SV_TARGET
|
||||||
blendFacSum = 1.0f;
|
blendFacSum = 1.0f;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
//use probehits for sharp cuts when singular,
|
|
||||||
//blendSum when wanting blend on all edging
|
|
||||||
if (blendSum>1.0)
|
if (blendSum>1.0)
|
||||||
{
|
{
|
||||||
float invBlendSumWeighted = 1.0f / blendFacSum;
|
float invBlendSumWeighted = 1.0f / blendFacSum;
|
||||||
|
|
@ -298,7 +296,7 @@ float4 main( PFXVertToPix IN ) : SV_TARGET
|
||||||
specular += F*iblBoxSpecular(surface, probes[i]);
|
specular += F*iblBoxSpecular(surface, probes[i]);
|
||||||
contrib +=probes[i].contribution;
|
contrib +=probes[i].contribution;
|
||||||
}
|
}
|
||||||
contrib = saturate(contrib);
|
|
||||||
irradiance = lerp(iblSkylightDiffuse(surface, probes[skyID]),irradiance,contrib);
|
irradiance = lerp(iblSkylightDiffuse(surface, probes[skyID]),irradiance,contrib);
|
||||||
specular = lerp(F*iblSkylightSpecular(surface, probes[skyID]),specular,contrib);
|
specular = lerp(F*iblSkylightSpecular(surface, probes[skyID]),specular,contrib);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue