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][Mobile Notifications] The Player freezes or crashes when calling "AndroidNotificationCenter.GetNotificationChannel" every frame
- Tile Palette selected dropdown text does not update when palette is renamed
- ArgumentException thrown and reference to Template gets unset when opening UXML file after editing referenced Template in Play mode
- [iOS][WebGL] Player freezes when multiple properties of a VisualElement are changed at the same time
- Warning 'GetControlID at event ValidateCommand returns a controlID different from the one in the Layout event' is logged when undoing the deletion of an Edited Freeform 2D Light
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