Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Flatten two textures into one with alpha

$
0
0
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.

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>