Android GLES20.glBlendEquation not working?

会有一股神秘感。 提交于 2019-12-01 17:51:24

i was experimenting on my Vega tablet (Tegra) and this worked for me:

fragment shader:

#extension GL_NV_shader_framebuffer_fetch : require 
// makes gl_LastFragColor accessible

precision highp float;

varying vec2 v_texcoord;

uniform sampler2D n_sampler;

void main()
{
    vec4 v_tex = texture2D(n_sampler, v_texcoord);
    gl_FragColor = min(gl_LastFragColor, v_tex); // MIN blending
}

Pretty easy, huh? But i'm afraid this will be NV-only.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!