need to add second UV as "multiply blend" of a simple shader

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:

 Shader "Vertex Color Lit" {
     Properties {
        _MainTex ("Base (RGB)", 2D) = "white" {}
     }
     SubShader {
        Tags { "RenderType"="Opaque" }
    
        Pass {
            Lighting On
            ColorMaterial AmbientAndDiffuse
            SetTexture [_MainTex] {
               combine texture * primary DOUBLE
            }
        }
     }
}

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?

 Shader "Vertex Color Lit 2UV" {
     Properties {
        _MainTex ("Base (RGB)", 2D) = "white" {}
        _OverTex ("OT (RGB)", 2D) = "white" {}
     }
     SubShader {
        Tags { "RenderType"="Opaque" }
   
        Pass {
            Lighting On
            ColorMaterial AmbientAndDiffuse
            SetTexture [_OverTex] {
                combine texture * primary DOUBLE
            }
            SetTexture [_MainTex] {
               combine texture * previous
            }
        }
     }
}

Thanks!

Anyone :confused: ?

In case someone cares, the solution was as simple as adding BindChannels {
Bind “texcoord”, texcoord0 // uv1
Bind “texcoord1”, texcoord1 // uv2
}

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.