Skip to content

Commit fbdf210

Browse files
author
Evergreen
committed
[Port] [6000.4] [URP][Shader Graph] Add stereo instancing support to custom UITK shaders written in ShaderGraph
1 parent 5946c73 commit fbdf210

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes

Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/UITKPass.hlsl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ PackedVaryings uie_custom_vert(Attributes input)
1616
uieInput.circle = input.uv6;
1717
uieInput.textureId = input.uv7.x;
1818

19+
UNITY_SETUP_INSTANCE_ID(input);
20+
UNITY_TRANSFER_INSTANCE_ID(input, uieInput);
21+
1922
v2f uieOutput = uie_std_vert(uieInput);
2023

2124
Varyings varyings = (Varyings)0;
@@ -32,6 +35,9 @@ PackedVaryings uie_custom_vert(Attributes input)
3235
varyings.texCoord3 = float4(uieOutput.textCoreLoc.x, uieOutput.textCoreLoc.y, input.uv0.z, input.uv0.w); // Layout uv in z, w
3336
varyings.texCoord4 = uieOutput.circle;
3437

38+
UNITY_TRANSFER_INSTANCE_ID(input, varyings);
39+
UNITY_TRANSFER_VERTEX_OUTPUT_STEREO(uieOutput, varyings);
40+
3541
PackedVaryings packedOutput = PackVaryings(varyings);
3642
return packedOutput;
3743
}

0 commit comments

Comments
 (0)