Blender V5.3
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 ()
LightProbeGridCacheFrame * read_result_unpacked ()
LightProbeGridCacheFrame * read_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 152 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 1262 of file eevee_lightprobe_volume.cc.

References blender::GPU_TEXTURE_USAGE_ATOMIC, blender::GPU_TEXTURE_USAGE_SHADER_READ, and blender::GPU_TEXTURE_USAGE_SHADER_WRITE.

Referenced by blender::eevee::Instance::light_bake_irradiance().

◆ init()

◆ irradiance_capture()

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

Store surfel irradiance inside the irradiance grid samples.

Definition at line 1376 of file eevee_lightprobe_volume.cc.

Referenced by blender::eevee::Instance::light_bake_irradiance().

◆ irradiance_offset()

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

Compute offset to bias irradiance capture location.

Definition at line 1277 of file eevee_lightprobe_volume.cc.

Referenced by blender::eevee::Instance::light_bake_irradiance().

◆ propagate_light()

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

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

Definition at line 1364 of file eevee_lightprobe_volume.cc.

Referenced by blender::eevee::Instance::light_bake_irradiance().

◆ 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 158 of file eevee_lightprobe_volume.hh.

Referenced by blender::eevee::Instance::light_bake_irradiance().

◆ 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 988 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(), blender::divide_ceil_u(), blender::DRW_object_get_data_for_drawing(), blender::G, blender::GPU_BARRIER_BUFFER_UPDATE, blender::GPU_BARRIER_SHADER_STORAGE, blender::GPU_debug_group_begin(), blender::GPU_debug_group_end(), blender::GPU_max_storage_buffer_size(), blender::GPU_mem_stats_get(), blender::GPU_mem_stats_supported(), blender::GPU_memory_barrier(), blender::GPU_TEXTURE_USAGE_HOST_READ, blender::GPU_TEXTURE_USAGE_SHADER_READ, blender::GPU_TEXTURE_USAGE_SHADER_WRITE, blender::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, blender::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(), blender::math::to_scale(), and transform_point().

Referenced by blender::eevee::Instance::light_bake_irradiance().

◆ surfels_lights_eval()

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

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

Definition at line 1241 of file eevee_lightprobe_volume.cc.

References blender::GPU_DEVICE_ANY, blender::GPU_DRIVER_ANY, blender::GPU_finish(), blender::GPU_OS_MAC, and blender::GPU_type_matches().

Referenced by blender::eevee::Instance::light_bake_irradiance().

◆ sync()


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