base: taa cleanup

This commit is contained in:
luboslenco
2026-05-03 00:10:54 +02:00
parent 490b807e6e
commit 598fcdade9
2 changed files with 3 additions and 34 deletions
+3 -33
View File
@@ -11,7 +11,6 @@ f32 sys_time(void);
gpu_pipeline_t *_mesh_object_last_pipeline = NULL;
vec4_t _camera_object_sphere_center = {0};
i32 camera_object_taa_frames = 1;
gpu_buffer_t *gpu_create_vertex_buffer(i32 count, gpu_vertex_structure_t *structure);
gpu_buffer_t *gpu_create_index_buffer(i32 count);
@@ -1087,38 +1086,9 @@ void camera_object_proj_jitter(camera_object_t *raw) {
i32 w = render_path_current_w;
i32 h = render_path_current_h;
raw->p = raw->no_jitter_p;
i32 i = raw->frame % camera_object_taa_frames;
f32 x = 0.0;
f32 y = 0.0;
if (i == 0) {
x = 0.5;
y = 0.333;
}
else if (i == 1) {
x = -0.5;
y = -0.333;
}
else if (i == 2) {
x = 0.25;
y = 0.111;
}
else if (i == 3) {
x = -0.25;
y = -0.111;
}
else if (i == 4) {
x = 0.375;
y = 0.444;
}
else {
x = -0.375;
y = -0.444;
}
x *= 2;
y *= 2;
i32 i = raw->frame % 2;
f32 x = i == 0 ? -0.5 : 0.5;
f32 y = i == 0 ? -0.5 : 0.5;
raw->p.m20 += x / w;
raw->p.m21 += y / h;
raw->frame++;
-1
View File
@@ -377,7 +377,6 @@ camera_data_t *camera_data_get_raw_by_name(any_array_t *datas, char *name);
// ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚════╝ ╚══════╝ ╚═════╝ ╚═╝
extern vec4_t _camera_object_sphere_center;
extern i32 camera_object_taa_frames;
camera_object_t *camera_object_create(camera_data_t *data);
void camera_object_build_proj(camera_object_t *raw, f32 screen_aspect);
void camera_object_remove(camera_object_t *raw);