Skip to content

Commit

Permalink
Use internal texture at internal resolution for calculating luminance.
Browse files Browse the repository at this point in the history
Fixes an error where the exposure was calculated incorrectly if a lower resolution scale was used while using FSR2. Now the behavior is consistent regardless of the resolution scale.
  • Loading branch information
DarioSamo committed Sep 29, 2023
1 parent 1989061 commit 1e2c28b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende
double step = RSG::camera_attributes->camera_attributes_get_auto_exposure_adjust_speed(p_render_data->camera_attributes) * time_step;
float auto_exposure_min_sensitivity = RSG::camera_attributes->camera_attributes_get_auto_exposure_min_sensitivity(p_render_data->camera_attributes);
float auto_exposure_max_sensitivity = RSG::camera_attributes->camera_attributes_get_auto_exposure_max_sensitivity(p_render_data->camera_attributes);
luminance->luminance_reduction(color_texture, color_size, luminance_buffers, auto_exposure_min_sensitivity, auto_exposure_max_sensitivity, step, set_immediate);
luminance->luminance_reduction(rb->get_internal_texture(), rb->get_internal_size(), luminance_buffers, auto_exposure_min_sensitivity, auto_exposure_max_sensitivity, step, set_immediate);

// Swap final reduce with prev luminance.

Expand Down

0 comments on commit 1e2c28b

Please sign in to comment.