mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
fix distance falloff misassignmen. fix uninitialized attenuation in root probes
This commit is contained in:
parent
5a2ec2731f
commit
a4266a1336
5 changed files with 5 additions and 5 deletions
|
|
@ -349,7 +349,7 @@ vec4 compute4Lights( Surface surface,
|
|||
}
|
||||
|
||||
//Probe IBL stuff
|
||||
float defineSphereSpaceInfluence(vec3 wsPosition, vec3 wsProbePosition, float radius)
|
||||
float defineSphereSpaceInfluence(vec3 wsPosition, vec3 wsProbePosition, float radius, float atten)
|
||||
{
|
||||
float3 L = (wsProbePosition.xyz - wsPosition);
|
||||
float innerRadius = radius-(radius*atten);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ void main()
|
|||
}
|
||||
else if (probeConfigData[i].r == 1) //sphere
|
||||
{
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, probePosArray[i].xyz, probeConfigData[i].g, probeConfigData[i].b*atten);
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, probePosArray[i].xyz, probeConfigData[i].g, probeConfigData[i].b)*atten;
|
||||
}
|
||||
|
||||
if (contribution[i]>0.0)
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|||
contribution[i] = defineBoxSpaceInfluence(surface.P, worldToObjArray[i], probeConfigData[i].b)*atten;
|
||||
}
|
||||
else if (probeConfigData[i].r == 1) //sphere
|
||||
{
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, probePosArray[i].xyz, probeConfigData[i].g, probeConfigData[i].b*atten);
|
||||
{
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, probePosArray[i].xyz, probeConfigData[i].g, probeConfigData[i].b)*atten;
|
||||
}
|
||||
|
||||
if (contribution[i]>0.0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue