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
- [Render Graph Viewer] Resource list icons cropped and in inconsistent positions
- Scene View with Debug Draw Mode enabled is gray when GPU Resident Drawer is enabled
- The UI is not visible when resizing out of focus built Player window with Application.runInBackground set to false
- [Linux] "Error while reading movie" errors are thrown when opening templates
- Shader warnings are being thrown after building Mixed Reality Template
Add comment