Unity Issue Tracker - Shader Internal error is shown when Graphics.RenderMeshPremitives is used with MatrixArray
Closed
UUM-103517
Shader Internal error is shown when Graphics.RenderMeshPremitives is used with MatrixArray
Unity: Shader System
Vulkan
OpenGL
Third Party Issue
6.2.X
6.1.X
6.0.X
2022.3.X
Unfortunately, it's an issue with the D3D compiler executable (FXC).
As a workaround, you could wrap the matrix array in a separate cbuffer like this:
cbuffer MyMatrices
{
float4x4 _Matrices[1000];
};
It prevents the compiler crash.
How to reproduce:
1. Open the attached “IN-97707” project
2. Select the Android (or Windows) build Platform
3. In Player Settings (Project Settings > Player), Select any of the following Graphics APIs: D3D11, Vulkan, OpenGL
4. Build the Player (File > Build Profiles > Build)
Expected result: A specific shader error is shown with details about the error
Actual result: An Internal error is shown, asking to report a bug
Reproducible environments: macOS 15.4 (M3 Max)
Not reproducible environments: No other environments tested
Notes:
The internal error shown in the console: Shader compiler: Compile Custom/ExampleShader - , Vertex Program: Internal error communicating with the shader compiler process. Please report a bug including this shader and the editor log. Error code 0x80000004 (Not connected).
The shader in question: “Assets/__Test/ExampleShader.shader“
Reproducible with D3D12, Vulkan and OpenGL Graphics APIs, Not reproducible with D3D11, Metal APIs
Prioritise and Follow this issue
Have a workaround or additional info about this issue?