Shader "ECSGame/URP/UnlitNormal" { Properties { _MainTex("Texture", 2D) = "white" {} } SubShader { Tags { "RenderType" = "Opaque" "RenderPipeline" = "UniversalRenderPipeline"} Cull off Pass { Tags { "LightMode" = "UniversalForward" } HLSLPROGRAM #pragma vertex vert #pragma fragment frag // Includes //changed //#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" //new #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" //changed //#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" //new #pragma target 4.5 #pragma multi_compile _ DOTS_INSTANCING_ON #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/UniversalDOTSInstancing.hlsl" //new struct appdata { float2 uv : TEXCOORD0; float4 pos : POSITION; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct v2f { float2 uv : TEXCOORD0; float4 vertex : SV_POSITION; UNITY_VERTEX_INPUT_INSTANCE_ID }; CBUFFER_START(UnityPerMaterial) float _AnimLen; sampler2D _MainTex; float4 _MainTex_ST; sampler2D _AnimMap; float4 _AnimMap_TexelSize;//x == 1/width CBUFFER_END float4 ObjectToClipPos(float3 pos) { return mul(UNITY_MATRIX_VP, mul(UNITY_MATRIX_M, float4 (pos,1))); } v2f vert(appdata v, uint vid : SV_VertexID) { UNITY_SETUP_INSTANCE_ID(v); v2f o; o.uv = TRANSFORM_TEX(v.uv, _MainTex); o.vertex = ObjectToClipPos(v.pos); return o; } float4 frag(v2f i) : SV_Target { float4 col = tex2D(_MainTex, i.uv); return col; } ENDHLSL } } }