mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
'better' (read here less completely craptacular) blending for boxes
This commit is contained in:
parent
f50ab7ec58
commit
690b8f3c47
1 changed files with 5 additions and 4 deletions
|
|
@ -115,16 +115,17 @@ float4 main( ConvexConnectP IN ) : SV_TARGET
|
||||||
if(useSphereMode)
|
if(useSphereMode)
|
||||||
{
|
{
|
||||||
float3 L = probeWSPos - surface.P;
|
float3 L = probeWSPos - surface.P;
|
||||||
blendVal = 1.0-length(L)/radius;
|
blendVal = 1.0-length(L)/radius;
|
||||||
|
clip(blendVal);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float tempAttenVal = 3.5;
|
float tempAttenVal = 3.5;
|
||||||
blendVal = defineBoxSpaceInfluence(surface.P, probeWSPos, radius, tempAttenVal);
|
blendVal = defineBoxSpaceInfluence(surface.P, probeWSPos, radius, tempAttenVal);
|
||||||
|
clip(blendVal);
|
||||||
|
float compression = 0.05;
|
||||||
|
blendVal=(1.0-compression)+blendVal*compression;
|
||||||
}
|
}
|
||||||
clip(blendVal);
|
|
||||||
|
|
||||||
|
|
||||||
//render into the bound space defined above
|
//render into the bound space defined above
|
||||||
float3 surfToEye = normalize(surface.P - eyePosWorld);
|
float3 surfToEye = normalize(surface.P - eyePosWorld);
|
||||||
float3 irradiance = TORQUE_TEXCUBELOD(irradianceCubemap, float4(surface.N,0)).xyz;
|
float3 irradiance = TORQUE_TEXCUBELOD(irradianceCubemap, float4(surface.N,0)).xyz;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue