Blender V5.3
ScreenThicknessEstimator Struct Reference

#include <eevee_ray_types_lib.bsl.hh>

Public Member Functions

float thickness (float sample_ss_z, float sample_ss_t, float sample_min_thickness)
bool intersect (float sample_ss_z, float sample_ss_t, float sample_min_thickness, float ray_ss_z, float ray_ss_z_prev)

Static Public Member Functions

static ScreenThicknessEstimator init (float start_z)

Public Attributes

float2 prev_ss_z_slope
float prev_ss_z
float prev_t

Detailed Description

Definition at line 98 of file eevee_ray_types_lib.bsl.hh.

Member Function Documentation

◆ init()

ScreenThicknessEstimator ScreenThicknessEstimator::init ( float start_z)
inlinestatic

◆ intersect()

bool ScreenThicknessEstimator::intersect ( float sample_ss_z,
float sample_ss_t,
float sample_min_thickness,
float ray_ss_z,
float ray_ss_z_prev )
inline

Check ray-sample intersection and update the internal state.

Parameters
sample_ss_zThe depth buffer sample.
sample_ss_tThe screen space ray t in pixel.
sample_min_thicknessThe minimum thickness to consider this sample. Ideally, it should be equal to the radius of the pixel at the sample depth.
ray_ss_zThe ray Z depth in depth buffer unit.
ray_ss_z_prevThe ray Z depth in depth buffer unit of the previous iteration.

Definition at line 159 of file eevee_ray_types_lib.bsl.hh.

References abs, and thickness().

Referenced by raytrace_screen().

◆ thickness()

float ScreenThicknessEstimator::thickness ( float sample_ss_z,
float sample_ss_t,
float sample_min_thickness )
inline

Return the screen thickness (in depth buffer unit) of a sample and update the internal state.

Parameters
sample_ss_zThe depth buffer sample.
sample_ss_tThe screen space ray t in pixel.
sample_min_thicknessThe minimum thickness to consider this sample. Ideally, it should be equal to the radius of the pixel at the sample depth.

Definition at line 123 of file eevee_ray_types_lib.bsl.hh.

References abs, any(), greaterThan, max, prev_ss_z, prev_ss_z_slope, prev_t, and thickness().

Referenced by eevee::fast_gi::eval(), intersect(), raytrace_screen_2(), and thickness().

Member Data Documentation

◆ prev_ss_z

float ScreenThicknessEstimator::prev_ss_z

Definition at line 102 of file eevee_ray_types_lib.bsl.hh.

Referenced by init(), and thickness().

◆ prev_ss_z_slope

float2 ScreenThicknessEstimator::prev_ss_z_slope

Definition at line 100 of file eevee_ray_types_lib.bsl.hh.

Referenced by init(), and thickness().

◆ prev_t

float ScreenThicknessEstimator::prev_t

Definition at line 104 of file eevee_ray_types_lib.bsl.hh.

Referenced by init(), and thickness().


The documentation for this struct was generated from the following file: