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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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