Blender V5.0
blender::eevee::IrradianceBake Class Reference

#include <eevee_lightprobe_volume.hh>

Public Member Functions

 IrradianceBake (Instance &inst)
bool should_break ()

Baking

void init (const Object &probe_object)
void sync ()
void surfel_raster_views_sync (const float3 &scene_min, const float3 &scene_max, const float4x4 &probe_to_world)
void surfels_create (const Object &probe_object)
void surfels_lights_eval ()
void clusters_build ()
void raylists_build ()
void propagate_light ()
void irradiance_offset ()
void irradiance_capture ()
LightProbeGridCacheFrameread_result_unpacked ()
LightProbeGridCacheFrameread_result_packed ()

Detailed Description

Baking related pass and data. Not used at runtime.

Definition at line 37 of file eevee_lightprobe_volume.hh.

Constructor & Destructor Documentation

◆ IrradianceBake()

blender::eevee::IrradianceBake::IrradianceBake ( Instance & inst)
inline

Definition at line 151 of file eevee_lightprobe_volume.hh.

Member Function Documentation

◆ clusters_build()

void blender::eevee::IrradianceBake::clusters_build ( )

Create a surfel lists per irradiance probe in order to compute the virtual baking offset. NOTE: The resulting lists are only valid until clusters_build() or raylists_build() are called since they share the same links inside the Surfel struct.

Definition at line 1244 of file eevee_lightprobe_volume.cc.

References clusters_build(), GPU_TEXTURE_USAGE_ATOMIC, GPU_TEXTURE_USAGE_SHADER_READ, and GPU_TEXTURE_USAGE_SHADER_WRITE.

Referenced by clusters_build().

◆ init()

◆ irradiance_capture()

void blender::eevee::IrradianceBake::irradiance_capture ( )

Store surfel irradiance inside the irradiance grid samples.

Definition at line 1358 of file eevee_lightprobe_volume.cc.

References irradiance_capture().

Referenced by irradiance_capture().

◆ irradiance_offset()

void blender::eevee::IrradianceBake::irradiance_offset ( )

Compute offset to bias irradiance capture location.

Definition at line 1259 of file eevee_lightprobe_volume.cc.

References irradiance_offset().

Referenced by irradiance_offset().

◆ propagate_light()

void blender::eevee::IrradianceBake::propagate_light ( )

Propagate light from surfel to surfel in a random direction over the sphere.

Definition at line 1346 of file eevee_lightprobe_volume.cc.

References propagate_light().

Referenced by propagate_light().

◆ raylists_build()

void blender::eevee::IrradianceBake::raylists_build ( )

◆ read_result_packed()

◆ read_result_unpacked()

◆ should_break()

bool blender::eevee::IrradianceBake::should_break ( )
inline

True if the bake job should stop.

Definition at line 157 of file eevee_lightprobe_volume.hh.

◆ surfel_raster_views_sync()

void blender::eevee::IrradianceBake::surfel_raster_views_sync ( const float3 & scene_min,
const float3 & scene_max,
const float4x4 & probe_to_world )

◆ surfels_create()

void blender::eevee::IrradianceBake::surfels_create ( const Object & probe_object)

Create a surfel representation of the scene from the probe using the capture pipeline.

We rasterize the scene along the 3 axes. Each generated fragment will write a surface element so raster grid density need to match the desired surfel density. We do a first pass to know how much surfel to allocate then render again to create the surfels.

Definition at line 973 of file eevee_lightprobe_volume.cc.

References blender::math::abs(), blender::eevee::SphereProbeData::atlas_coord, blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::Manager::bounds_buf, CLOG_INFO, blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), blender::math::divide_ceil(), divide_ceil_u(), DRW_object_get_data_for_drawing(), G, GPU_BARRIER_BUFFER_UPDATE, GPU_BARRIER_SHADER_STORAGE, GPU_debug_group_begin(), GPU_debug_group_end(), GPU_max_storage_buffer_size(), GPU_mem_stats_get(), GPU_mem_stats_supported(), GPU_memory_barrier(), GPU_TEXTURE_USAGE_HOST_READ, GPU_TEXTURE_USAGE_SHADER_READ, GPU_TEXTURE_USAGE_SHADER_WRITE, Object::id, blender::draw::detail::Pass< DrawCommandBufType >::init(), invert(), IRRADIANCE_BOUNDS_GROUP_SIZE, IRRADIANCE_GRID_GROUP_SIZE, blender::eevee::LIGHTPROBE_IRRADIANCE_BOUNDS, blender::eevee::Instance::log, min, ID::name, normalize, blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::math::reduce_min(), blender::draw::Manager::resource_handle_count(), blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), SURFEL_GROUP_SIZE, surfel_raster_views_sync(), surfels_create(), blender::math::to_scale(), transform_point(), and xy.

Referenced by surfels_create().

◆ surfels_lights_eval()

void blender::eevee::IrradianceBake::surfels_lights_eval ( )

Evaluate direct lighting (and also clear the surfels radiance).

Definition at line 1225 of file eevee_lightprobe_volume.cc.

References GPU_DEVICE_ANY, GPU_DRIVER_ANY, GPU_finish(), GPU_OS_MAC, GPU_type_matches(), and surfels_lights_eval().

Referenced by surfels_lights_eval().

◆ sync()


The documentation for this class was generated from the following files: