Shader "BaseURPShader"
{
Properties
{
_Color("Color",COLOR)=(1,1,1,1)
_MainTex("MainTex",2D)="white"{}
}
SubShader
{
Tags
{
"RenderPipeline"="UniversalPipeline"
"RenderType"="Opaque"
"UniversalMaterialType" = "Unlit"
"Queue"="Geometry"
}
Pass
{
Name "Pass"
Tags
{
}
Cull Back
Blend One Zero
ZTest LEqual
ZWrite On
HLSLPROGRAM
#pragma target 4.5
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
struct Attributes
{
float3 positionOS : POSITION;
float2 uv:TEXCOORD;
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float2 uv:TEXCOORD0;
};
CBUFFER_START(UnityPerMaterial)
half4 _Color;
float4 _MainTex_ST;
TEXTURE2D(_MainTex);
SAMPLER(sampler_MainTex);
CBUFFER_END
Varyings vert(Attributes v)
{
Varyings o = (Varyings)0;
float3 positionWS=TransformObjectToWorld(v.positionOS);
o.positionCS=TransformWorldToHClip(positionWS);
o.uv=TRANSFORM_TEX(v.uv,_MainTex);
return o;
}
half4 frag(Varyings i) : SV_TARGET
{
half4 c;
half4 mainTex=SAMPLE_TEXTURE2D(_MainTex,sampler_MainTex,i.uv);
c=mainTex*_Color;
return c;
}
ENDHLSL
}
}
FallBack "Hidden/Shader Graph/FallbackError"
}
|