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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Add comment