Unity Issue Tracker - Metal shader error when using a StructuredBuffer
Closed
UUM-31102
Metal shader error when using a StructuredBuffer
Unity: Metal
As Designed
2020.3.X
The error message is correct. The shader in the project declares a StructuredBuffer, but the project does not set a buffer. Use Material.SetBuffer to assign a buffer and the error message will go away.
How to reproduce:
1. Download and open the attached project
2. Open "test scene" scene
3. Observe the console window
Expected outcome: No errors appear in the console window
Actual outcome "Metal: Vertex or Fragment Shader "Unlit/ShaderBug" requires a ComputeBuffer at index 0 to be bound, but none provided. Skipping draw calls to avoid crashing." error appears in the console window