Hi! have been struggling a lot with shaders, I need to edit a simple vertex lit shader in order for it to support the second UV map of a model with a texture as multiply, this will allow me to do a better decal system with blood splatter, and could also work for baked ambient oclussion so I don’t have to use those expensive post effects, anyway, I have this shader:
So, how do I add a second texture field that multiplies with the base one?
Thanks a lot for your help, seriously I still can’t get the grip with shaders.
Well, I figured out 2 things, first one I could add another texture and use it as multiply of the other, ok, but then I read that this is a legacy method, so the examples I’m finding regarding how to use second texture in second UV map are using other syntax I don’t understand, so with the new shader I only need to assign the “OverTexture” ot the second uv, how do I do that?
Also be aware this is a fixed function style shader and are semi-deprecated. Unity currently converts these into vertex fragment shaders when actually used, and you can see that code by selecting the shader in Unity and clicking on show generated code.
They’re fine to use for now, but you can do a lot more with vertex/fragment or surface style shaders.