Search Issue Tracker
By Design
Votes
0
Found in
5.0.0f2
Issue ID
673327
Regression
No
Shader preprocessor ignores Unity platform defines
How to reproduce:
1. Open new project
2. Import attached shader into project
3. Place two planes one above another
4. Create a material using the imported shader
- The shader appears to be a simple distance-based blur
5. Open the shader
6. Go to line 78
7. Adjust the code under the #else statement to produce slightly different results (for example, change 0.5 to 0.6) and save the shader
8. Return to the Editor and observe the changes
9. Build to OSX/Win standalone and run
- Notice how the #elif statements were ignored and the shader produces the same result in standalone as in the editor
- The the #if and #elif statements appear to work fine, as simply using 1 or 0 produces expected results.
- The platform defines match the ones in http://docs.unity3d.com/Manual/PlatformDependentCompilation.html
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Add comment