Search Issue Tracker
Fixed
Fixed in 2021.3.26f1, 2022.2.7f1, 2023.1.0b2, 2023.2.0a1
Votes
0
Found in
2020.3.44f1
2021.3.16f1
2022.2.2f1
2023.1.0a25
2023.2.0a1
Issue ID
UUM-22593
Regression
No
[Metal] Shader is broken when using SV_PrimitiveID
How to reproduce:
1. Open the attached project "Metal PrimitiveID Bug" and load Scene "ReproScene"
2. Observe the Scene
Expected result: The Shader of the Cube in the Scene appears as intended
Actual result: The Shader of the Cube is broken
Reproducible with: 2020.3.44f1, 2021.3.16f1, 2022.2.2f1, 2023.1.0a25
Reproduced on:
- MacOS (Intel) Editor
Notes:
- The issue does not reproduce when using OpenGLCore as the Graphics API
Comments (2)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Foldout arrow indent is misaligned in the Inspector when used in Custom Type
- [Android] The Player screen turns black when playing a video under certain conditions
- Search window icons at the bottom are cut off when Search window is resized vertically
- "Try something else?" text label is cut off when searching for a long text in the Search window
- Rendering Debugger window sections do not have a minimum width set when resizing with the slider in the middle of the window
flyer19
Mar 06, 2024 05:42
using unity 2023.2.11f1
flyer19
Mar 06, 2024 05:40
DS_Output DS( HS_ConstantOutput HSConstantData,
const OutputPatch<HS_ControlPointOutput, 3> Input,
float3 BarycentricCoords : SV_DomainLocation,uint idTriangle : SV_PrimitiveID )
{
DS_Output Output = (DS_Output)0;
float fU = BarycentricCoords.x;
float fV = BarycentricCoords.y;
float fW = BarycentricCoords.z;
float3 pos = Input[0].pos * fU + Input[1].pos * fV + Input[2].pos * fW;
float2 uv=Input[0].uv * fU + Input[1].uv * fV + Input[2].uv * fW;
Output.uv=uv+idTriangle;
Output.pos = UnityObjectToClipPos (float4(pos.xyz,1.0));
return Output;
}
using idTriangle still not work