You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Core: Use Math namespace for constants
This commit is contained in:
@@ -81,7 +81,7 @@ SSEffects::SSEffects() {
|
||||
int b = spmap[subPass];
|
||||
|
||||
float ca, sa;
|
||||
float angle0 = (float(a) + float(b) / float(sub_pass_count)) * Math_PI * 0.5f;
|
||||
float angle0 = (float(a) + float(b) / float(sub_pass_count)) * Math::PI * 0.5f;
|
||||
|
||||
ca = Math::cos(angle0);
|
||||
sa = Math::sin(angle0);
|
||||
@@ -706,7 +706,7 @@ void SSEffects::screen_space_indirect_lighting(Ref<RenderSceneBuffersRD> p_rende
|
||||
}
|
||||
}
|
||||
radius_near_limit /= tan_half_fov_y;
|
||||
ssil.gather_push_constant.intensity = p_settings.intensity * Math_PI;
|
||||
ssil.gather_push_constant.intensity = p_settings.intensity * Math::PI;
|
||||
ssil.gather_push_constant.fade_out_mul = -1.0 / (ssil_fadeout_to - ssil_fadeout_from);
|
||||
ssil.gather_push_constant.fade_out_add = ssil_fadeout_from / (ssil_fadeout_to - ssil_fadeout_from) + 1.0;
|
||||
ssil.gather_push_constant.inv_radius_near_limit = 1.0f / radius_near_limit;
|
||||
@@ -788,7 +788,7 @@ void SSEffects::screen_space_indirect_lighting(Ref<RenderSceneBuffersRD> p_rende
|
||||
RD::get_singleton()->draw_command_begin_label("Generate Importance Map");
|
||||
ssil.importance_map_push_constant.half_screen_pixel_size[0] = 1.0 / p_ssil_buffers.buffer_width;
|
||||
ssil.importance_map_push_constant.half_screen_pixel_size[1] = 1.0 / p_ssil_buffers.buffer_height;
|
||||
ssil.importance_map_push_constant.intensity = p_settings.intensity * Math_PI;
|
||||
ssil.importance_map_push_constant.intensity = p_settings.intensity * Math::PI;
|
||||
|
||||
//base pass
|
||||
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, ssil.pipelines[SSIL_GATHER_BASE]);
|
||||
|
||||
Reference in New Issue
Block a user