Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "Unlit/PP/PSTexturaEscalable"
- {
- Properties{
- _MainTex("Base (RGB)", 2D) = "" {}
- _SubTex("Base (RGB)", 2D) = "" {}
- _LerpTex("Lerp", 2D) = "" {}
- _Color("Colorfijo", Color) = (1.0, 0.0, 0.0)
- }
- SubShader
- {
- Pass
- {
- CGPROGRAM
- #pragma vertex vsMain
- #pragma fragment psMain
- #include "UnityCG.cginc"
- sampler2D _MainTex;
- float4 _MainTex_ST;
- sampler2D _SubTex;
- float4 _SubTex_ST;
- sampler2D _LerpTex;
- float4 _LerpTex_ST;
- float4 _Color;
- struct VsIn {
- float4 vertex : POSITION;
- float2 texcoord : TEXCOORD0;
- };
- struct VsOut {
- float4 pos : SV_POSITION;
- float2 uv : TEXCOORD0;
- float2 uv1 : TEXCOORD1;
- float2 uv2 : TEXCOORD2;
- };
- VsOut vsMain(appdata_base v) {
- VsOut o;
- o.pos = UnityObjectToClipPos(v.vertex);
- o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
- o.uv1 = TRANSFORM_TEX(v.texcoord, _SubTex);
- o.uv2 = TRANSFORM_TEX(v.texcoord, _LerpTex);
- return o;
- };
- float4 psMain(VsOut i) : COLOR {
- return lerp(tex2D(_MainTex, i.uv), tex2D(_SubTex, i.uv1), tex2D(_LerpTex, i.uv2).a);
- }
- ENDCG
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement