Search Issue Tracker
Fixed in 2017.3.0f3
Votes
0
Found in
2017.1.1p1
Issue ID
951506
Regression
No
DirectX 9 errors appear when using DirectX 11 features, even if the Graphics API is set to d3d11 and "#pragma target 3.5"
Reproduction steps:
1. Open "ShaderTargetBroken.zip" project
2. Click on "ArrayShadeBroken" and see that there is an error "Undefined variable...(d3d9)"
3. Click on "ArrayShadeWorking" and see that there are no errors
Expected Result: No errors regarding DirectX 9 should appear as the graphics API is not included
Actual Result: DirectX 9 errors appear, because of using features not supported by it
Fixed from 2017.2. For a fix with earlier versions, use the workaround at the bottom.
Reproduced with: 2017.1.1p4, 5.6.3p4, 5.5.5f1
Did not reproduce on: 2017.3.0b3, 2017.2.0f2 (Unexpected identifier "Texture2DArray". Expected: ')')
Note:
If the error doesn't appear immediately, change something in the broken shader, save, go back to the editor, revert changes to script and come back to the Editor
Graphics API's are set to DirectX 11, Vulkan and Metal
The issue is worked around by using "#if SHADER_TARGET > 30" on affected variables
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
Add comment