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
- Texture Map Viewer shows "Loading..." text instead of indicating users that Baked Texture Maps are missing
- "Analyze Import Process" button misaligned in Import Activity window
- Text in “Baked Shadowmask” mode is difficult to read in Baked Lightmap Viewer when Editor theme is set to Light
- Mesh wireframe is difficult to see in Baked Lightmap Viewer window when texture opacity is maximized
- Informational text does not wrap and does not fit when the Viewer Window is opened by default
Add comment