android - How to deal with etc1 alpha channel -
i'm trying support etc1 android game have no idea how deal alpha channel.
can tell me start , how etc1 working alpha?
update: using: gl_fragcolor = vec4(tex1.rgb,tex2.a);
doesn't work, there still black rectangle around texture
you need alphamask shader.
basically instead of having 1 texture full color information including transparency, have 1 texture rgb (etc1) , 1 texture alpha (can etc1).
then in fragment shader, assign rgb first texture , alpha 2nd.
gl_fragcolor = vec4(tex1.rgb,tex2.a);
!note code above exeplifying approach, syntax might wrong.
Comments
Post a Comment