1
0
Fork 0

HDR: Remove glass.eff minimum alpha hack

This commit is contained in:
Fernando García Liñán 2021-08-19 20:19:55 +02:00
parent 7ff31e9004
commit b52fe3bf34
2 changed files with 1 additions and 8 deletions

View file

@ -582,11 +582,6 @@
<type>float-vec4</type>
<value><use>material/diffuse</use></value>
</uniform>
<uniform>
<name>minimum_alpha</name>
<type>float</type>
<value>0.1</value>
</uniform>
<!-- Lighting include -->
<uniform>
<name>dfg_lut</name>

View file

@ -8,7 +8,6 @@ in vec4 materialColor;
in vec3 ecPos;
uniform sampler2D color_tex;
uniform float minimum_alpha = 0.0;
uniform mat4 osg_ViewMatrixInverse;
uniform vec4 fg_Viewport;
@ -49,8 +48,7 @@ void main()
{
vec4 baseColorTexel = texture(color_tex, texCoord);
vec3 baseColor = decodeSRGB(baseColorTexel.rgb) * materialColor.rgb;
// HACK: Force a minimum value to stay compatible with glass.eff
float alpha = max(materialColor.a * baseColorTexel.a, minimum_alpha);
float alpha = materialColor.a * baseColorTexel.a;
vec3 n = normalize(normalVS);
vec3 v = normalize(-ecPos);