Search Issue Tracker

Fixed in 2021.1.X



Found in




Issue ID




[iOS][Metal] Shaders with tessellation are not compiled when displacement feature is removed from #pragma



How to reproduce:
1. Open the attached '' project
2. Switch Platform to iOS in Build Settings
3. Build for iOS and open the Xcode project
4. Deploy Xcode project to an iOS device

Expected result: The blue cube is displayed in the Scene and no errors are thrown to the Xcode console
Actual result: Scene is empty and 'program_source:199:50: error: assigning to 'float4' (vector of 4 'float' values) from incompatible type 'threadgroup half4' (vector of 4 'half' values) output.COLOR0 = input.cp[controlPointID].COLOR0;' error it thrown to the Xcode console

Reproducible with: 2018.4.27f1, 2019.4.13f1, 2020.1.9f1, 2020.2.0b7, 2021.1.0a1

Reproducible with:
iPhone 8+ (iOS 12.0)
iPhone XR (iOS 13.4.1)
iPad 9.7’ 6th gen (iOS 14.2)

Not reproducible:
macOS 11.0 Beta Big Sur

- Reproducible on Metal, not reproducible on Open GLES 3
- Shader is taken from the documentation:
- Shader works fine when the displacement feature is included #pragma
- When using displacement, Unity Shader Compiler does not include COLOR semantic to Mtl VertexOut and ControlPoint structs

  1. Resolution Note (fix version 2021.1):

    Fixed in 2021.1.0a5

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.