Search Issue Tracker
Fixed in 2021.1.X
Fixed in 2020.1.X, 2020.2.X
Votes
0
Found in
2020.2.0a13
2020.2.0b1
Issue ID
1275604
Regression
Yes
Shader compiler stopped being able to expand statements in macro arguments in Unity 2020.2
How to reproduce:
1. Open a new project
2. Extract the "MudBun.zip" file into the created project's Assets folder
3. Select the "MarchingCubes" Asset in the Project window (Assets/Resources/Compute)
4. Press "Show compiled code" in the Inspector window
5. Observe the code in the External Script Editor
6. Go back to the Editor
7. Observe the Console log
Expected result: Compiled code is shown in the External Script Editor (step 5) and no errors are shown in the Console log (step 7)
Actual result: "Failed to compile compute shader." is shown in the External Script Editor (step 5). "Shader error in 'MarchingCubes': 'FOR_EACH_BRUSH': Too few arguments to a macro call. at kernel generate_flat_marching_cubes_mesh at BrushMaskFuncs.cginc(116)" error message in shown in the Console log (step 7)
Reproducible with: 2020.2.0a13, 2020.2.0b3
Not reproducible with: 2019.4.11f1, 2020.1.6f1, 2020.2.0a12
Could not test with: 2018.4.27f1 (Multiple errors due to unsupported features, such as SceneVisibilityManager, Graphics.DrawProceduralIndirect)
Beta Forum Thread:
https://forum.unity.com/threads/shader-macro-with-multi-line-arguments-fails-to-compile.974061/
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android][BiRP] Depth processing is handled incorrectly on certain Android devices when using 2 camera's
- [APV] Cancelling Display Dialog Error is thrown after Adaptive Probe Volumes tab is open in Lighting Window
- [APV] NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
- "OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
Resolution Note (fix version 2021.1):
Fixed in: 2021.1.0a1
Resolution Note (fix version 2020.2):
Fixed in: 2020.2.0b7
Resolution Note (fix version 2020.1):
Fixed in: 2020.1.10f1