两个图片正常混合效果图
fragment Shader
// 正常的颜色混合 uniform sampler2D U_MainTexture; uniform sampler2D U_SubTexture; varying vec2 M_coord; void main() { vec4 blendColor = texture2D(U_SubTexture, M_coord); vec4 baseColor = texture2D(U_MainTexture, M_coord); gl_FragColor = blendColor * blendColor.a + baseColor * (1 - blendColor.a); }
时间: 2024-12-28 16:10:27