Search Issue Tracker

By Design

Votes

0

Found in

2022.3.67f1

6000.0.59f1

6000.2.7f1

6000.4.0a1

Issue ID

UUM-120484

Regression

No

A DX11 shader error is thrown when compiling shaders for platforms without DX11 support

-

Steps to reproduce:
1. Download the attached user's project "ShadersAndroid2.zip"
2. Delete the Library folder to simulate a fresh checkout
3. Run via CMD: "EditorPath\Unity.exe -projectPath "ProjectPath\ShadersAndroid" -buildTarget android -openscene Assets/Scenes/SampleScene.unity -batchmode -quit -nographics -executeMethod AutoBuilder.PerformAndroidBuild -logFile "LogFilePath\LogFile.txt"
4. Open the generated "LogFile.txt" and search for: "Shader error in 'Examples/URP/StructRepro': Vertex program 'Vert': Struct variable 'c_user_view_data' is ignored. Only instancing constant buffers can have struct variables"

Expected result: no errors are present in build logs referring to D3D11 when building for Android in batch mode
Actual result: Shader error is present in build logs referring to D3D11 when building for Android in batch mode

Reproducible with: 2022.3.67f1, 6000.0.59f1, 6000.2.7f1, 6000.4.0a1
Not reproducible with: 6000.3.0b4

Environment tested: Windows 11 24H2

Notes:
-Issue does not reproduce when building on Windows for Android
-According to the customer this also reproduces on Linux Editor when building for Android
-Error might appear when launching the Editor after a batch build is successful

  1. Resolution Note:

    The `-nographics` argument tells the shader compiler it's D3D11. The error can be safely ignored.

Add comment

Log in to post comment