I am building a texture editing app.
When the use goes into editing mode, the canvas uses a shader that has a separate alpha channel (the Stencil texture below).
Properties
{
_MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
_Color ("Main Color", Color) = (0,0,0,0)
_Stencil("Stencil Texture (RGB)", 2D) = "white" {}
}
When the user leaves editing mode, I want to flatten and combine _MainTex and _ Stencil into one texture. That is applied in this shader.
Properties {
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
Do I have to use encodeToPNG()? Or is there a better way to do it.
↧