Add a debanding property to Viewport for GLES3

It can be enabled in the Project Settings
(`rendering/quality/filters/use_debanding`). It's disabled
by default as it has a small performance impact and can make
PNG screenshots much larger (due to how dithering works).

As a result, it should be enabled only when banding is noticeable enough.

Since debanding requires a HDR viewport to work, it's only supported
in the GLES3 backend.
This commit is contained in:
Hugo Locurcio
2020-10-20 18:58:07 +02:00
parent 150f9ce807
commit 2dbc329704
21 changed files with 109 additions and 3 deletions

View File

@@ -4231,6 +4231,18 @@
If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [ARVRInterface].
</description>
</method>
<method name="viewport_set_use_debanding">
<return type="void">
</return>
<argument index="0" name="viewport" type="RID">
</argument>
<argument index="1" name="debanding" type="bool">
</argument>
<description>
If [code]true[/code], uses a fast post-processing filter to make banding significantly less visible. In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger.
[b]Note:[/b] Only available on the GLES3 backend. [member Viewport.hdr] must also be [code]true[/code] for debanding to be effective.
</description>
</method>
<method name="viewport_set_use_fxaa">
<return type="void">
</return>