"#if defined(SHD_FILTER_CURVE)\n"
" float old_alpha = max(c.a, 0.00001);\n"
" float new_alpha = texture2D(tex_filter, vec2(old_alpha, 0.0)).a;\n"
- " c = vec4(texture2D(tex_filter, vec2(c.r / old_alpha, 0.0)).r * new_alpha,\n"
- " texture2D(tex_filter, vec2(c.g / old_alpha, 0.0)).g * new_alpha,\n"
- " texture2D(tex_filter, vec2(c.b / old_alpha, 0.0)).b * new_alpha,\n"
+ " c = vec4(texture2D(tex_filter, vec2(c.r, 0.0)).r,\n"
+ " texture2D(tex_filter, vec2(c.g, 0.0)).g,\n"
+ " texture2D(tex_filter, vec2(c.b, 0.0)).b,\n"
" new_alpha);\n"
"#endif\n"
"#ifdef SHD_ALPHA_ONLY\n"
#if defined(SHD_FILTER_CURVE)
float old_alpha = max(c.a, 0.00001);
float new_alpha = texture2D(tex_filter, vec2(old_alpha, 0.0)).a;
- c = vec4(texture2D(tex_filter, vec2(c.r / old_alpha, 0.0)).r * new_alpha,
- texture2D(tex_filter, vec2(c.g / old_alpha, 0.0)).g * new_alpha,
- texture2D(tex_filter, vec2(c.b / old_alpha, 0.0)).b * new_alpha,
+ c = vec4(texture2D(tex_filter, vec2(c.r, 0.0)).r,
+ texture2D(tex_filter, vec2(c.g, 0.0)).g,
+ texture2D(tex_filter, vec2(c.b, 0.0)).b,
new_alpha);
#endif