hook up attenuation value. todo: sort networkjing properly

This commit is contained in:
Azaezel 2019-03-21 23:47:01 -05:00
parent 8595e273a4
commit ead78ec588
5 changed files with 21 additions and 79 deletions

View file

@ -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));