39 const SceneEEVEE &sce_eevee = inst_.scene->eevee;
48 data_.pixel_size =
float2(2.0f) /
float2(inst_.film.render_extent_get());
58 const SceneEEVEE &sce_eevee = inst_.scene->eevee;
61 float max_distance = inst_.camera.bound_radius() * 2.0f;
68 if (!render_pass_enabled_) {
72 render_pass_ps_.init();
74 render_pass_ps_.specialize_constant(sh,
"ao_slice_count", ray_count_);
75 render_pass_ps_.specialize_constant(sh,
"ao_step_count", step_count_);
76 render_pass_ps_.shader_set(sh);
79 render_pass_ps_.bind_resources(inst_.uniform_data);
80 render_pass_ps_.bind_resources(inst_.sampling);
81 render_pass_ps_.bind_resources(inst_.hiz_buffer.front);
83 render_pass_ps_.bind_texture(
"dummy_tx", &dummy_tx_);
84 render_pass_ps_.bind_image(
"in_normal_img", &inst_.render_buffers.rp_color_tx);
85 render_pass_ps_.push_constant(
"in_normal_img_layer_index", &inst_.render_buffers.data.normal_id);
86 render_pass_ps_.bind_image(
"out_ao_img", &inst_.render_buffers.rp_value_tx);
87 render_pass_ps_.push_constant(
"out_ao_img_layer_index",
88 &inst_.render_buffers.data.ambient_occlusion_id);
91 render_pass_ps_.dispatch(