mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
take ibl amount into account for translucent opacity
This commit is contained in:
parent
9f29bee45f
commit
fad8e12667
4 changed files with 12 additions and 10 deletions
|
|
@ -605,10 +605,11 @@ vec4 computeForwardProbes(Surface surface,
|
|||
finalColor *= surface.ao;
|
||||
|
||||
if(isCapturing == 1)
|
||||
return vec4(lerp((finalColor), surface.baseColor.rgb,surface.metalness),0);
|
||||
return vec4(lerp((finalColor), surface.baseColor.rgb,surface.metalness),surface.baseColor.a);
|
||||
else
|
||||
{
|
||||
return vec4(finalColor, 0);
|
||||
float reflectionOpacity = min(max(surface.baseColor.a,length(specular+irradiance)),1.0);
|
||||
return vec4(finalColor, reflectionOpacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -610,10 +610,11 @@ float4 computeForwardProbes(Surface surface,
|
|||
finalColor *= surface.ao;
|
||||
|
||||
if(isCapturing == 1)
|
||||
return float4(lerp((finalColor), surface.baseColor.rgb,surface.metalness),0);
|
||||
return float4(lerp((finalColor), surface.baseColor.rgb,surface.metalness),surface.baseColor.a);
|
||||
else
|
||||
{
|
||||
return float4(finalColor, 0);
|
||||
float reflectionOpacity = min(max(surface.baseColor.a,length(specular+irradiance)),1.0);
|
||||
return float4(finalColor, reflectionOpacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue