You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add debanding to SMAA and apply debanding before spatial upscalers.
This commit is contained in:
@@ -59,7 +59,7 @@ private:
|
||||
struct SMAAEdgePushConstant {
|
||||
float inv_size[2];
|
||||
float threshold;
|
||||
float reserved;
|
||||
float pad;
|
||||
};
|
||||
|
||||
struct SMAAWeightPushConstant {
|
||||
@@ -71,7 +71,13 @@ private:
|
||||
|
||||
struct SMAABlendPushConstant {
|
||||
float inv_size[2];
|
||||
float reserved[2];
|
||||
uint32_t flags;
|
||||
float pad;
|
||||
};
|
||||
|
||||
enum SMAABlendFlags {
|
||||
SMAA_BLEND_FLAG_USE_8_BIT_DEBANDING = (1 << 0),
|
||||
SMAA_BLEND_FLAG_USE_10_BIT_DEBANDING = (1 << 1),
|
||||
};
|
||||
|
||||
struct SMAAEffect {
|
||||
@@ -103,6 +109,13 @@ public:
|
||||
|
||||
void allocate_render_targets(Ref<RenderSceneBuffersRD> p_render_buffers);
|
||||
void process(Ref<RenderSceneBuffersRD> p_render_buffers, RID p_source_color, RID p_dst_framebuffer);
|
||||
|
||||
enum DebandingMode {
|
||||
DEBANDING_MODE_DISABLED,
|
||||
DEBANDING_MODE_8_BIT,
|
||||
DEBANDING_MODE_10_BIT,
|
||||
};
|
||||
DebandingMode debanding_mode = DEBANDING_MODE_DISABLED;
|
||||
};
|
||||
|
||||
} // namespace RendererRD
|
||||
|
||||
Reference in New Issue
Block a user