Cleanup: EEVEE-Next: Rename lightprobe display files

_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/122457
This commit is contained in:
Clément Foucault
2024-05-30 00:15:43 +02:00
committed by Clément Foucault
parent a6774b2930
commit ce062f03a3
18 changed files with 43 additions and 41 deletions

View File

@@ -488,12 +488,12 @@ set(GLSL_SRC
engines/eevee_next/shaders/eevee_depth_of_field_stabilize_comp.glsl
engines/eevee_next/shaders/eevee_depth_of_field_tiles_dilate_comp.glsl
engines/eevee_next/shaders/eevee_depth_of_field_tiles_flatten_comp.glsl
engines/eevee_next/shaders/eevee_display_probe_grid_frag.glsl
engines/eevee_next/shaders/eevee_display_probe_grid_vert.glsl
engines/eevee_next/shaders/eevee_display_probe_planar_frag.glsl
engines/eevee_next/shaders/eevee_display_probe_planar_vert.glsl
engines/eevee_next/shaders/eevee_display_probe_reflection_frag.glsl
engines/eevee_next/shaders/eevee_display_probe_reflection_vert.glsl
engines/eevee_next/shaders/eevee_display_lightprobe_volume_frag.glsl
engines/eevee_next/shaders/eevee_display_lightprobe_volume_vert.glsl
engines/eevee_next/shaders/eevee_display_lightprobe_planar_frag.glsl
engines/eevee_next/shaders/eevee_display_lightprobe_planar_vert.glsl
engines/eevee_next/shaders/eevee_display_lightprobe_sphere_frag.glsl
engines/eevee_next/shaders/eevee_display_lightprobe_sphere_vert.glsl
engines/eevee_next/shaders/eevee_film_comp.glsl
engines/eevee_next/shaders/eevee_film_cryptomatte_post_comp.glsl
engines/eevee_next/shaders/eevee_film_frag.glsl

View File

@@ -344,7 +344,7 @@ void SphereProbeModule::viewport_draw(View &view, GPUFrameBuffer *view_fb)
viewport_display_ps_.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH |
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CULL_BACK);
viewport_display_ps_.framebuffer_set(&view_fb);
viewport_display_ps_.shader_set(instance_.shaders.static_shader_get(DISPLAY_PROBE_REFLECTION));
viewport_display_ps_.shader_set(instance_.shaders.static_shader_get(DISPLAY_PROBE_SPHERE));
viewport_display_ps_.bind_resources(*this);
viewport_display_ps_.bind_ssbo("display_data_buf", display_data_buf_);
viewport_display_ps_.draw_procedural(GPU_PRIM_TRIS, 1, display_data_buf_.size() * 6);

View File

@@ -611,7 +611,7 @@ void VolumeProbeModule::display_pass_draw(View &view, GPUFrameBuffer *view_fb)
display_grids_ps_.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH |
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CULL_BACK);
display_grids_ps_.framebuffer_set(&view_fb);
display_grids_ps_.shader_set(inst_.shaders.static_shader_get(DISPLAY_PROBE_GRID));
display_grids_ps_.shader_set(inst_.shaders.static_shader_get(DISPLAY_PROBE_VOLUME));
display_grids_ps_.push_constant("sphere_radius", grid.viewport_display_size);
display_grids_ps_.push_constant("grid_resolution", grid_size);

View File

@@ -112,10 +112,12 @@ void WorldPipeline::sync(GPUMaterial *gpumat)
void WorldPipeline::render(View &view)
{
/* TODO(Miguel Pozo): All world probes are rendered as RAY_TYPE_GLOSSY. */
inst_.pipelines.data.is_probe_reflection = true;
inst_.pipelines.data.is_sphere_probe = true;
inst_.uniform_data.push_update();
inst_.manager->submit(cubemap_face_ps_, view);
inst_.pipelines.data.is_probe_reflection = false;
inst_.pipelines.data.is_sphere_probe = false;
inst_.uniform_data.push_update();
}
@@ -1383,7 +1385,7 @@ void PlanarProbePipeline::render(View &view,
{
GPU_debug_group_begin("Planar.Capture");
inst_.pipelines.data.is_probe_reflection = true;
inst_.pipelines.data.is_sphere_probe = true;
inst_.uniform_data.push_update();
GPU_framebuffer_bind(gbuffer_fb);
@@ -1406,7 +1408,7 @@ void PlanarProbePipeline::render(View &view,
GPU_framebuffer_bind(combined_fb);
inst_.manager->submit(eval_light_ps_, view);
inst_.pipelines.data.is_probe_reflection = false;
inst_.pipelines.data.is_sphere_probe = false;
inst_.uniform_data.push_update();
GPU_debug_group_end();

View File

@@ -704,7 +704,7 @@ class PipelineModule {
void begin_sync()
{
data.is_probe_reflection = false;
data.is_sphere_probe = false;
probe.begin_sync();
planar.begin_sync();
deferred.begin_sync();

View File

@@ -139,12 +139,12 @@ const char *ShaderModule::static_shader_create_info_name_get(eShaderType shader_
return "eevee_debug_irradiance_grid";
case DEBUG_GBUFFER:
return "eevee_debug_gbuffer";
case DISPLAY_PROBE_GRID:
return "eevee_display_probe_grid";
case DISPLAY_PROBE_REFLECTION:
return "eevee_display_probe_reflection";
case DISPLAY_PROBE_VOLUME:
return "eevee_display_lightprobe_volume";
case DISPLAY_PROBE_SPHERE:
return "eevee_display_lightprobe_sphere";
case DISPLAY_PROBE_PLANAR:
return "eevee_display_probe_planar";
return "eevee_display_lightprobe_planar";
case DOF_BOKEH_LUT:
return "eevee_depth_of_field_bokeh_lut";
case DOF_DOWNSAMPLE:

View File

@@ -45,8 +45,8 @@ enum eShaderType {
DEBUG_SURFELS,
DEBUG_IRRADIANCE_GRID,
DISPLAY_PROBE_GRID,
DISPLAY_PROBE_REFLECTION,
DISPLAY_PROBE_VOLUME,
DISPLAY_PROBE_SPHERE,
DISPLAY_PROBE_PLANAR,
DOF_BOKEH_LUT,

View File

@@ -2052,7 +2052,7 @@ BLI_STATIC_ASSERT_ALIGN(PlanarProbeDisplayData, 16)
struct PipelineInfoData {
float alpha_hash_scale;
bool32_t is_probe_reflection;
bool32_t is_sphere_probe;
float _pad1;
float _pad2;
};

View File

@@ -299,8 +299,8 @@ void CaptureView::render_probes()
while (const auto update_info = inst_.sphere_probes.probe_update_info_pop()) {
GPU_debug_group_begin("Probe.Capture");
if (!inst_.pipelines.data.is_probe_reflection) {
inst_.pipelines.data.is_probe_reflection = true;
if (!inst_.pipelines.data.is_sphere_probe) {
inst_.pipelines.data.is_sphere_probe = true;
inst_.uniform_data.push_update();
}
@@ -347,8 +347,8 @@ void CaptureView::render_probes()
inst_.sphere_probes.remap_to_octahedral_projection(update_info->atlas_coord, false);
}
if (inst_.pipelines.data.is_probe_reflection) {
inst_.pipelines.data.is_probe_reflection = false;
if (inst_.pipelines.data.is_sphere_probe) {
inst_.pipelines.data.is_sphere_probe = false;
inst_.uniform_data.push_update();
}
}

View File

@@ -111,7 +111,7 @@ void init_globals()
#elif defined(MAT_CAPTURE)
g_data.ray_type = RAY_TYPE_DIFFUSE;
#else
if (uniform_buf.pipeline.is_probe_reflection) {
if (uniform_buf.pipeline.is_sphere_probe) {
g_data.ray_type = RAY_TYPE_GLOSSY;
}
else {

View File

@@ -78,34 +78,34 @@ GPU_SHADER_CREATE_INFO(eevee_lightprobe_sphere_convolve)
.compute_source("eevee_lightprobe_sphere_convolve_comp.glsl")
.do_static_compilation(true);
GPU_SHADER_INTERFACE_INFO(eevee_display_probe_reflection_iface, "")
GPU_SHADER_INTERFACE_INFO(eevee_display_lightprobe_sphere_iface, "")
.smooth(Type::VEC3, "P")
.smooth(Type::VEC2, "lP")
.flat(Type::INT, "probe_index");
GPU_SHADER_CREATE_INFO(eevee_display_probe_reflection)
GPU_SHADER_CREATE_INFO(eevee_display_lightprobe_sphere)
.additional_info("eevee_shared", "draw_view", "eevee_lightprobe_sphere_data")
.storage_buf(0, Qualifier::READ, "SphereProbeDisplayData", "display_data_buf[]")
.vertex_source("eevee_display_probe_reflection_vert.glsl")
.vertex_out(eevee_display_probe_reflection_iface)
.fragment_source("eevee_display_probe_reflection_frag.glsl")
.vertex_source("eevee_display_lightprobe_sphere_vert.glsl")
.vertex_out(eevee_display_lightprobe_sphere_iface)
.fragment_source("eevee_display_lightprobe_sphere_frag.glsl")
.fragment_out(0, Type::VEC4, "out_color")
.do_static_compilation(true);
GPU_SHADER_INTERFACE_INFO(eevee_display_probe_planar_iface, "")
GPU_SHADER_INTERFACE_INFO(eevee_display_lightprobe_planar_iface, "")
.flat(Type::VEC3, "probe_normal")
.flat(Type::INT, "probe_index");
GPU_SHADER_CREATE_INFO(eevee_display_probe_planar)
GPU_SHADER_CREATE_INFO(eevee_display_lightprobe_planar)
.push_constant(Type::IVEC4, "world_coord_packed")
.additional_info("eevee_shared",
"draw_view",
"eevee_lightprobe_planar_data",
"eevee_lightprobe_sphere_data")
.storage_buf(0, Qualifier::READ, "PlanarProbeDisplayData", "display_data_buf[]")
.vertex_source("eevee_display_probe_planar_vert.glsl")
.vertex_out(eevee_display_probe_planar_iface)
.fragment_source("eevee_display_probe_planar_frag.glsl")
.vertex_source("eevee_display_lightprobe_planar_vert.glsl")
.vertex_out(eevee_display_lightprobe_planar_iface)
.fragment_source("eevee_display_lightprobe_planar_frag.glsl")
.fragment_out(0, Type::VEC4, "out_color")
.do_static_compilation(true);

View File

@@ -39,15 +39,15 @@ GPU_SHADER_CREATE_INFO(eevee_debug_irradiance_grid)
.fragment_source("eevee_debug_irradiance_grid_frag.glsl")
.do_static_compilation(true);
GPU_SHADER_INTERFACE_INFO(eevee_display_probe_grid_iface, "")
GPU_SHADER_INTERFACE_INFO(eevee_display_lightprobe_volume_iface, "")
.smooth(Type::VEC2, "lP")
.flat(Type::IVEC3, "cell");
GPU_SHADER_CREATE_INFO(eevee_display_probe_grid)
GPU_SHADER_CREATE_INFO(eevee_display_lightprobe_volume)
.additional_info("eevee_shared", "draw_view")
.vertex_source("eevee_display_probe_grid_vert.glsl")
.vertex_out(eevee_display_probe_grid_iface)
.fragment_source("eevee_display_probe_grid_frag.glsl")
.vertex_source("eevee_display_lightprobe_volume_vert.glsl")
.vertex_out(eevee_display_lightprobe_volume_iface)
.fragment_source("eevee_display_lightprobe_volume_frag.glsl")
.fragment_out(0, Type::VEC4, "out_color")
.push_constant(Type::FLOAT, "sphere_radius")
.push_constant(Type::IVEC3, "grid_resolution")