You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Jitter shadow map dithering pattern across frames when TAA is enabled
This improves shadow quality by reducing the visibility of the noisy pattern caused by dithering. This jittering also applies when FSR2 is enabled, as it provides its own form of temporal antialiasing. Co-authored-by: Clay John <claynjohn@gmail.com>
This commit is contained in:
@@ -112,6 +112,7 @@ void RenderSceneDataRD::update_ubo(RID p_uniform_buffer, RS::ViewportDebugDraw p
|
||||
|
||||
ubo.taa_jitter[0] = taa_jitter.x;
|
||||
ubo.taa_jitter[1] = taa_jitter.y;
|
||||
ubo.taa_frame_count = taa_frame_count;
|
||||
|
||||
ubo.z_far = z_far;
|
||||
ubo.z_near = z_near;
|
||||
|
||||
@@ -48,6 +48,7 @@ public:
|
||||
Transform3D cam_transform;
|
||||
Projection cam_projection;
|
||||
Vector2 taa_jitter;
|
||||
float taa_frame_count = 0.0f;
|
||||
uint32_t camera_visible_layers;
|
||||
bool cam_orthogonal = false;
|
||||
bool flip_y = false;
|
||||
@@ -148,8 +149,8 @@ private:
|
||||
|
||||
float fog_height_density;
|
||||
float fog_depth_curve;
|
||||
float pad;
|
||||
float fog_depth_begin;
|
||||
float taa_frame_count; // Used to add break up samples over multiple frames. Value is an integer from 0 to taa_phase_count -1.
|
||||
|
||||
float fog_light_color[3];
|
||||
float fog_depth_end;
|
||||
|
||||
Reference in New Issue
Block a user