mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-23 05:15:34 +00:00
simplified translucent opacity nudging
the basic articulable principle is the thicker and less translucent a given object is, the more it mimics standard solid objects. the more transparent, the less light bounces back since it continues on uninterrupted, casuing less backscatter.
This commit is contained in:
parent
37ef090137
commit
8d0fde4d1c
4 changed files with 10 additions and 8 deletions
|
|
@ -608,7 +608,8 @@ vec4 computeForwardProbes(Surface surface,
|
|||
return vec4(lerp((finalColor), surface.baseColor.rgb,surface.metalness),0);
|
||||
else
|
||||
{
|
||||
return vec4(finalColor, 0);
|
||||
float reflectionOpacity = min(surface.baseColor.a+surface.baseColor.a*length(finalColor),1.0);
|
||||
return vec4(finalColor, reflectionOpacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -613,7 +613,8 @@ float4 computeForwardProbes(Surface surface,
|
|||
return float4(lerp((finalColor), surface.baseColor.rgb,surface.metalness),0);
|
||||
else
|
||||
{
|
||||
return float4(finalColor, 0);
|
||||
float reflectionOpacity = min(surface.baseColor.a+surface.baseColor.a*length(finalColor),1.0);
|
||||
return float4(finalColor, reflectionOpacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue