Why this gloomEffect glsl code output only black & white image?

the code below produce only black & white output :frowning: any idea why ?


varying vec4 TEX0;
vec4 _ret_0;
vec3 _TMP4;
float _TMP3;
vec3 _x0014;
vec3 _TMP15;
float _grey0022;
float _grey0028;
vec3 _TMP35;
uniform float _GloomIntensity;
uniform float _BaseIntensity;
uniform float _GloomSaturation;
uniform float _BaseSaturation;
uniform sampler2D _Input;
void main()
{
    vec4 _color1;
    vec3 _base;
    vec3 _gloom;
    vec3 _TMP10;
    _color1 = texture2D(_Input, TEX0.xy);
    _base = 1.0 - _color1.xyz/_color1.w;
    _x0014 = (_base - 2.50000000E-001)/7.50000000E-001;
    _TMP4 = min(vec3( 1.0, 1.0, 1.0), _x0014);
    _TMP15 = max(vec3( 0.0, 0.0, 0.0), _TMP4);
    _grey0022 = dot(_TMP15, vec3( 3.00000012E-001, 5.89999974E-001, 1.09999999E-001));
    _TMP3 = _grey0022 + _GloomSaturation*(_TMP15.x - _grey0022);
    _gloom = vec3(_TMP3, _TMP3, _TMP3)*_GloomIntensity;
    _grey0028 = dot(_base, vec3( 3.00000012E-001, 5.89999974E-001, 1.09999999E-001));
    _TMP3 = _grey0028 + _BaseSaturation*(_base.x - _grey0028);
    _base = vec3(_TMP3, _TMP3, _TMP3)*_BaseIntensity;
    _TMP4 = min(vec3( 1.0, 1.0, 1.0), _gloom);
    _TMP35 = max(vec3( 0.0, 0.0, 0.0), _TMP4);
    _base = _base*(1.0 - _TMP35);
    _TMP10 = (1.0 - (_base + _gloom))*_color1.w;
    _ret_0 = vec4(_TMP10.x, _TMP10.y, _TMP10.z, _color1.w);
    gl_FragColor = _ret_0;
}

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.