Search Issue Tracker
By Design
Votes
0
Found in
5.6.0f3
Issue ID
912767
Regression
No
multi_compile ignores Preprocessor directives
To reproduce:
1. Download and open "rotate-test.zip" project.
2. Select "NewUnlitShader" in Assets folder.
3. In the inspector click "Compile and show code" button.
4. In the compiled code notice lines with "Keywords set in this variant" words.
Expected result: Only one multi_compile statement is executed and it outputs:
Keywords set in this variant: A
Keywords set in this variant: B
Actual result: Both multi_compile statements in "NewUnlitShader" shader are executed resulting in wrong results:
Keywords set in this variant: A C
Keywords set in this variant: A D
Keywords set in this variant: B D
Reproduced with: 2017.1.0b6, 5.6.1p1, 5.5.3p2, 5.4.5p1
Notes: multi_compile is surrounded by if/else statement, one multi_compile being in if clause and other multi_compile in else close. Thus both are executed, even thought if/else should limit only one these statements to be executed.
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