1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Add support for contrast-adaptive sharpening in 3D (GLES3 only)

This is an older, easier to implement variant of CAS as a pure
fragment shader. It doesn't support upscaling, but we won't make
use of it (at least for now).

The sharpening intensity can be adjusted on a per-Viewport basis.
For the root viewport, it can be adjusted in the Project Settings.

Since `textureLodOffset()` isn't available in GLES2, there is no
way to support contrast-adaptive sharpening in GLES2.
This commit is contained in:
Hugo Locurcio
2021-03-27 18:58:12 +01:00
parent 296608460b
commit a9c0c5484f
23 changed files with 159 additions and 6 deletions

View File

@@ -683,6 +683,7 @@ public:
virtual void viewport_set_msaa(RID p_viewport, ViewportMSAA p_msaa) = 0;
virtual void viewport_set_use_fxaa(RID p_viewport, bool p_fxaa) = 0;
virtual void viewport_set_use_debanding(RID p_viewport, bool p_debanding) = 0;
virtual void viewport_set_sharpen_intensity(RID p_viewport, float p_intensity) = 0;
enum ViewportUsage {
VIEWPORT_USAGE_2D,