Blender V4.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 ()
 
LightProbeGridCacheFrameread_result_unpacked ()
 
LightProbeGridCacheFrameread_result_packed ()
 

Detailed Description

Baking related pass and data. Not used at runtime.

Definition at line 32 of file eevee_lightprobe_volume.hh.

Constructor & Destructor Documentation

◆ IrradianceBake()

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

Definition at line 137 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 1138 of file eevee_lightprobe_volume.cc.

References GPU_R32I, GPU_TEXTURE_USAGE_ATOMIC, GPU_TEXTURE_USAGE_SHADER_READ, and 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 1242 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 1152 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 1230 of file eevee_lightprobe_volume.cc.

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

◆ raylists_build()

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

Create a surfel lists to emulate ray-casts for the current sample random direction. 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 1165 of file eevee_lightprobe_volume.cc.

References ceil_to_multiple_u(), cross(), divide_ceil_u(), e, GPU_storagebuf_clear(), invert(), M_SQRT1_2, blender::math::max(), max, min, normalize(), SURFEL_LIST_GROUP_SIZE, transform_point(), and blender::VecBase< T, Size >::xy().

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

◆ 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 143 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 )

Create the views used to rasterize the scene into surfel representation.

Definition at line 817 of file eevee_lightprobe_volume.cc.

References distance(), FLT_MAX, invert(), max, blender::math::midpoint(), min, blender::math::to_loc_rot_scale(), transform_point(), view, and z().

◆ surfels_create()

◆ surfels_lights_eval()

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

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

Definition at line 1125 of file eevee_lightprobe_volume.cc.

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

◆ sync()


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