use high on painting shaders
This commit is contained in:
@@ -20,14 +20,14 @@ void main()
|
||||
uniform sampler2D tex;
|
||||
uniform sampler2D tex_alpha;
|
||||
uniform sampler2D tex_bg;
|
||||
uniform mediump float alpha;
|
||||
uniform highp float alpha;
|
||||
uniform int blend_mode;
|
||||
|
||||
in mediump vec2 uv;
|
||||
in highp vec2 uv;
|
||||
#if defined(GL_EXT_shader_framebuffer_fetch)
|
||||
inout highp vec4 frag;
|
||||
#else
|
||||
out mediump vec4 frag;
|
||||
out highp vec4 frag;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
@@ -38,15 +38,15 @@ void main()
|
||||
#elif defined(GL_ARM_shader_framebuffer_fetch)
|
||||
highp vec4 bg = gl_LastFragColorARM;
|
||||
#else
|
||||
mediump vec4 bg = texture(tex_bg, uv);
|
||||
highp vec4 bg = texture(tex_bg, uv);
|
||||
#endif
|
||||
|
||||
mediump vec4 fg = vec4(texture(tex, uv).rgb, texture(tex_alpha, uv).a);
|
||||
highp vec4 fg = vec4(texture(tex, uv).rgb, texture(tex_alpha, uv).a);
|
||||
if (fg.a == 0.0)
|
||||
{
|
||||
frag = bg;
|
||||
return;
|
||||
}
|
||||
mediump vec4 blended = blend(bg, fg, blend_mode);
|
||||
highp vec4 blended = blend(bg, fg, blend_mode);
|
||||
frag = vec4(blended.rgb, blended.a * alpha);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user