|
Blender V5.3
|
#include <eevee_depth_of_field_setup.bsl.hh>
Public Member Functions | |
| DofSample | spatial_filtering (uint3 local_id) const |
| DofNeighborhoodMinMax | neighbor_boundbox (uint3 local_id) const |
| float2 | pixel_history_motion_vector (int2 texel_sample, uint3 local_id) const |
| DofSample | sample_history (float2 input_texel) const |
| float | history_blend_factor (float velocity, float2 texel, DofNeighborhoodMinMax bbox, DofSample src, DofSample dst) const |
Public Attributes | |
| CameraVelocity | camera |
| draw::View | views |
| const bool | u_use_history |
| const DepthOfFieldData & | dof_buf |
| sampler2D | coc_tx |
| sampler2D | color_tx |
| sampler2D | velocity_tx |
| sampler2D | in_history_tx |
| sampler2DDepth | depth_tx |
| image2D | out_color_img |
| image2D | out_coc_img |
| image2D | out_history_img |
LDS Cache | |
| float4 | color_cache [DOF_STABILIZE_GROUP_SIZE+2][DOF_STABILIZE_GROUP_SIZE+2] |
| float | coc_cache [DOF_STABILIZE_GROUP_SIZE+2][DOF_STABILIZE_GROUP_SIZE+2] |
| float | depth_cache [DOF_STABILIZE_GROUP_SIZE+4][DOF_STABILIZE_GROUP_SIZE+4] |
| void | cache_init (uint3 global_id, uint3 local_id) |
| DofSample | fetch_input_sample (int2 offset, uint3 local_id) const |
| float | fetch_half_depth (int2 offset, uint3 local_id) const |
Definition at line 125 of file eevee_depth_of_field_setup.bsl.hh.
Load enough values into LDS to perform the filter.
┌──────────────────────────────┐ │ │ < Border texels that needs to be loaded. │ x x x x x x x x │ ─┐ │ x x x x x x x x │ │ │ x x x x x x x x │ │ │ x x x x x x x x │ │ Thread Group Size 8x8. │ L L L L L x x x x │ │ │ L L L L L x x x x │ │ │ L L L L L x x x x │ │ │ L L L L L x x x x │ ─┘ │ L L L L L │ < Border texels that needs to be loaded. └──────────────────────────────┘ └───────────┘ Load using 5x5 threads.
Definition at line 152 of file eevee_depth_of_field_setup.bsl.hh.
References all(), barrier(), clamp(), coc_cache, coc_tx, color_cache, color_tx, depth_cache, depth_tx, lessThan, reverse_z::read(), texelFetch(), textureSize(), int2::x, x, int2::y, y, and colorspace::YCoCg_from_scene_linear().
|
inline |
Definition at line 210 of file eevee_depth_of_field_setup.bsl.hh.
References depth_cache, int2::x, and int2::y.
Referenced by pixel_history_motion_vector().
|
inline |
Definition at line 204 of file eevee_depth_of_field_setup.bsl.hh.
References coc_cache, color_cache, int2::x, and int2::y.
Referenced by neighbor_boundbox(), and spatial_filtering().
|
inline |
"High Quality Temporal Supersampling" by Brian Karis at SIGGRAPH 2014 (Slide 43) Bias towards history if incoming pixel is near clamping. Reduces flicker.
Definition at line 353 of file eevee_depth_of_field_setup.bsl.hh.
References abs, any(), eevee::dof::setup::stabilize::DofSample::coc, eevee::dof::setup::stabilize::DofSample::color, greaterThanEqual, imageSize(), lessThan, eevee::dof::setup::stabilize::DofNeighborhoodMinMax::max, max, eevee::dof::setup::stabilize::DofNeighborhoodMinMax::min, mix, out_history_img, reduce_min(), safe_rcp(), saturate, u_use_history, and float4::x.
|
inline |
Simple bounding box calculation in YCoCg as described in: "High Quality Temporal Supersampling" by Brian Karis at SIGGRAPH 2014
Definition at line 247 of file eevee_depth_of_field_setup.bsl.hh.
References eevee::dof::setup::stabilize::DofSample::coc, eevee::dof::setup::stabilize::DofSample::color, fetch_input_sample(), max, and min.
|
inline |
Dilate velocity by using the nearest pixel in a cross pattern. "High Quality Temporal Supersampling" by Brian Karis at SIGGRAPH 2014 (Slide 27)
Definition at line 285 of file eevee_depth_of_field_setup.bsl.hh.
References camera, clamp(), color_tx, fetch_half_depth(), textureSize(), velocity_tx, and views.
|
inline |
Definition at line 311 of file eevee_depth_of_field_setup.bsl.hh.
References in_history_tx, modf, reduce_add(), textureLod(), textureSize(), float4::w, float2::x, float4::x, float2::y, float4::y, and float4::z.
Definition at line 218 of file eevee_depth_of_field_setup.bsl.hh.
References eevee::dof::setup::stabilize::bilateral_weight(), eevee::dof::setup::stabilize::DofSample::coc, eevee::dof::setup::stabilize::DofSample::color, dof_buf, fetch_input_sample(), eevee::dof::setup::stabilize::luma_weight(), and float4::x.
| CameraVelocity eevee::dof::setup::stabilize::Resources::camera |
Definition at line 126 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by pixel_history_motion_vector().
| float eevee::dof::setup::stabilize::Resources::coc_cache[DOF_STABILIZE_GROUP_SIZE+2][DOF_STABILIZE_GROUP_SIZE+2] |
Definition at line 148 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by cache_init(), and fetch_input_sample().
| sampler2D eevee::dof::setup::stabilize::Resources::coc_tx |
Definition at line 133 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by cache_init().
| float4 eevee::dof::setup::stabilize::Resources::color_cache[DOF_STABILIZE_GROUP_SIZE+2][DOF_STABILIZE_GROUP_SIZE+2] |
Definition at line 147 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by cache_init(), and fetch_input_sample().
| sampler2D eevee::dof::setup::stabilize::Resources::color_tx |
Definition at line 134 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by cache_init(), and pixel_history_motion_vector().
| float eevee::dof::setup::stabilize::Resources::depth_cache[DOF_STABILIZE_GROUP_SIZE+4][DOF_STABILIZE_GROUP_SIZE+4] |
Definition at line 150 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by cache_init(), and fetch_half_depth().
| sampler2DDepth eevee::dof::setup::stabilize::Resources::depth_tx |
Definition at line 137 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by cache_init().
| const DepthOfFieldData& eevee::dof::setup::stabilize::Resources::dof_buf |
Definition at line 131 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by spatial_filtering().
| sampler2D eevee::dof::setup::stabilize::Resources::in_history_tx |
Definition at line 136 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by sample_history().
| image2D eevee::dof::setup::stabilize::Resources::out_coc_img |
Definition at line 140 of file eevee_depth_of_field_setup.bsl.hh.
| image2D eevee::dof::setup::stabilize::Resources::out_color_img |
Definition at line 139 of file eevee_depth_of_field_setup.bsl.hh.
| image2D eevee::dof::setup::stabilize::Resources::out_history_img |
Definition at line 141 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by history_blend_factor().
| const bool eevee::dof::setup::stabilize::Resources::u_use_history |
Definition at line 129 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by history_blend_factor().
| sampler2D eevee::dof::setup::stabilize::Resources::velocity_tx |
Definition at line 135 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by pixel_history_motion_vector().
| draw::View eevee::dof::setup::stabilize::Resources::views |
Definition at line 127 of file eevee_depth_of_field_setup.bsl.hh.
Referenced by pixel_history_motion_vector().