Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ Shader "Universal Render Pipeline/2D/Sprite-Lit-Default"
// NOTE: Do not ifdef the properties here as SRP batcher can not handle different layouts.
CBUFFER_START( UnityPerMaterial )
half4 _Color;
float4 _MainTex_ST;
CBUFFER_END

Varyings UnlitVertex(Attributes attributes)
Expand All @@ -261,7 +262,7 @@ Shader "Universal Render Pipeline/2D/Sprite-Lit-Default"
#if defined(DEBUG_DISPLAY)
o.positionWS = TransformObjectToWorld(attributes.positionOS);
#endif
o.uv = attributes.uv;
o.uv = TRANSFORM_TEX(attributes.uv, _MainTex);
o.color = attributes.color * _Color * unity_SpriteColor;
return o;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ Shader "Universal Render Pipeline/2D/Sprite-Unlit-Default"
// NOTE: Do not ifdef the properties here as SRP batcher can not handle different layouts.
CBUFFER_START( UnityPerMaterial )
half4 _Color;
float4 _MainTex_ST;
CBUFFER_END

Varyings UnlitVertex(Attributes attributes)
Expand All @@ -169,7 +170,7 @@ Shader "Universal Render Pipeline/2D/Sprite-Unlit-Default"
#if defined(DEBUG_DISPLAY)
o.positionWS = TransformObjectToWorld(attributes.positionOS);
#endif
o.uv = attributes.uv;
o.uv = TRANSFORM_TEX(attributes.uv, _MainTex);
o.color = attributes.color * _Color * unity_SpriteColor;
return o;
}
Expand Down