I want to have a Godot 4.0 TextureRect
background with a linear gradient from #18181b
to #27272a
. This causes some noticeable color banding issues:
I tried to research and solve this issue. I found a GitHub issue asking for dithering which ultimately points to another issue on a "debanding" option which would fix this.
I've found the setting in Godot and enabled it:
But the screen remains completely unchanged. Both when I actually run the project, and inside the editor:
The tooltip does say:
2D rendering is not affected by debanding unless the Environment.background_mode is Environment.BG_CANVAS.
So I also added a WorldEnvironment
Node as a child to the Panel
root node, created a new environment, and set the Background/Mode property to "Canvas" from the dropdown. This didn't change anything either.
What am I missing?
PS. As a workaround I've created a gradient in Figma and exported it as a PNG. This works, but is a bit cumbersome (I want to change the "to" and "from" colors of the gradient frequently). Here's a screenshot for reference: