hi guys, can someone who understands shader help me?
The image on the right, I’m trying to make it look exactly the same as the left with black borders, but the left is completely white inside due to the mask. Is there a way to color this white to black?
It’s hard to say without understanding how your MainTex and MaskText data is structured and the intent.
The simplest answer would be to make sure you only use the mask.a for the T parts of your Lerps, while actually lerping between a different “alpha” value that is black or whatever other replacement color you might want.
But your system here also seems like it might be overcomplicating things a bit. What is the overall intent of this system?
so friend, this system he paints the texture that contains the RGB colors without mixing, this works well.
I’m trying to make this white color around the dog go black.
this white color, which I am trying to replace with black, is the mask; if I color normally, it changes to uv_MainTex, because the mask is linked to uv_maintex as you can see on line 21
would have any way to solve, however small?
Yes I understand that and gave a simple solution to that. But you are sampling 2 textures, a _MainTex and a _MaskTex. And you’re using RGBA from both. So I’m trying to understand more so I can perhaps recommend some simplification here.
Is the image on the left exactly what _MainTex looks like? If so, then all you need to do is lerp the R, G and B channels of main based on the mask R, G and B, layering them.
the image on the left photo I use as a reference, the right one is the mask and the maintex
I use it like this, the mask is inside (main text) and the other normal colored texture is on the mask
the method you mentioned should be easy as it only uses one texture it’s complicated