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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -