I’m getting the following error when I try to build my project with UCB.
Player export failed. Reason: Shader error in 'Standard (Vertex Color)': Program 'fragForwardBase_VC', error X4506: ps_4_0_level_9_1 input limit (8) exceeded, shader uses 9 inputs. (on d3d11_9x)
I’ve changed the Player Settings to only use Direct3D11 for Windows builds - how can I force UCB to build for DX11 only?
Hey @Jacob-Williams
It looks like you are using the Standard Shader with Vertex Color support from this thread: Standard shader with vertex colors - Unity Engine - Unity Discussions The last page in that thread states this is a known error (unrelated to Unity Cloud Build) and has some suggested workarounds.
Thanks for getting back to me, Ryan. The work around is to essentially to rewrite portions of the shader, and at this point I’m probably just going to replace it. However, the ultimate issue is that UCB is not respecting the Graphics API player settings. Maybe I’m missing something here?
If you have the Graphics APIs for Windows section of your Player Settings set up identical to the attached image (highlighted in red), UCB will definitely build for DX11 only as this is controlled entirely by this Player Settings option and not overridden by UCB.
My player settings are identical to screenshot you posted. If this is the case, why does UCB try to compile the shader for d3d11_9x? Sorry for my ignorance, but I’m just trying to better understand how the system works - I assumed if Unity built the project locally just fine, UCB would work.
Usually, if it builds correctly locally, it should build correctly in UCB. If it doesn’t, usually those issues tend to be related to platform differences between Windows and Mac. Builds currently in UCB are performed on Mac OSX as USB originally was for iOS builds only.
As far as d3d11_9x in the logs, my shader knowledge is very rusty, but I would guess that it’s using d3d11_9x instead of d3d11 due to some flags in the shader itself such as #pragma target being set to 3.0 instead of 4.0 or 5.0. If you run your build locally, in the editor logs do you see any references to d3d11_9x or are they all d3d11?