mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
hook up attenuation value. todo: sort networkjing properly
This commit is contained in:
parent
8595e273a4
commit
ead78ec588
5 changed files with 21 additions and 79 deletions
|
|
@ -71,8 +71,7 @@ float getDistBoxToPoint(float3 pt, float3 extents)
|
|||
float defineBoxSpaceInfluence(Surface surface, ProbeData probe, float3 wsEyeRay)
|
||||
{
|
||||
float3 surfPosLS = mul(probe.worldToLocal, float4(surface.P, 1.0)).xyz;
|
||||
float probeattenuationvalue = 0.5; // feed meh
|
||||
float atten = 1.0-probeattenuationvalue;
|
||||
float atten = probe.attenuation;
|
||||
float baseVal = 0.25;
|
||||
float dist = getDistBoxToPoint(surfPosLS,float3(baseVal,baseVal,baseVal));
|
||||
return saturate(smoothstep(baseVal+0.0001,atten*baseVal,dist));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue