- Home /
Shader error in 'Standard'
When building a standalone project in Unity 5.6.2p1, it gives me this error:
Shader error in 'Standard': Too many math instructions for SM2.0 (65 needed, max is 64). Try #pragma target 3.0 at /Program Files (x86)/Unity/Editor/Data/CGIncludes/UnityStandardBRDF.cginc(451) (on d3d9)
Compiling Fragment program with DIRECTIONAL LIGHTMAP_ON SHADOWS_SHADOWMASK _ALPHAPREMULTIPLY_ON _NORMALMAP
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP
Any Solution???
It's probably trying to compile for DX9 (or an equivalent). What platform are you compiling for?
I'm compiling for Windows x86.... maybe I have to build for x86_64?
Answer by GameDev_Chuck · Aug 31, 2017 at 06:23 PM
Disabling 'Use HDR' (high dynamic range) in Tier 1 of Edit->Project Settings->Graphics seems to get rid of the error. Why? I do not know. Something to do with dx9
Your answer
Follow this Question
Related Questions
Firebase Analytics Unity Problem to build an Android apk 0 Answers
Build android error 2 Answers
Gradle Build Failed [UNITY 2019] 0 Answers