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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment