Blender V5.3
eevee::dof::setup::stabilize::Resources Struct Reference

#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

Detailed Description

Definition at line 125 of file eevee_depth_of_field_setup.bsl.hh.

Member Function Documentation

◆ cache_init()

void eevee::dof::setup::stabilize::Resources::cache_init ( uint3 global_id,
uint3 local_id )
inline

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().

◆ fetch_half_depth()

float eevee::dof::setup::stabilize::Resources::fetch_half_depth ( int2 offset,
uint3 local_id ) const
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().

◆ fetch_input_sample()

DofSample eevee::dof::setup::stabilize::Resources::fetch_input_sample ( int2 offset,
uint3 local_id ) const
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().

◆ history_blend_factor()

float eevee::dof::setup::stabilize::Resources::history_blend_factor ( float velocity,
float2 texel,
DofNeighborhoodMinMax bbox,
DofSample src,
DofSample dst ) const
inline

◆ neighbor_boundbox()

DofNeighborhoodMinMax eevee::dof::setup::stabilize::Resources::neighbor_boundbox ( uint3 local_id) const
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.

◆ pixel_history_motion_vector()

float2 eevee::dof::setup::stabilize::Resources::pixel_history_motion_vector ( int2 texel_sample,
uint3 local_id ) const
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.

◆ sample_history()

DofSample eevee::dof::setup::stabilize::Resources::sample_history ( float2 input_texel) const
inline

◆ spatial_filtering()

Member Data Documentation

◆ camera

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().

◆ coc_cache

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().

◆ coc_tx

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().

◆ color_cache

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().

◆ color_tx

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().

◆ depth_cache

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().

◆ depth_tx

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().

◆ dof_buf

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().

◆ in_history_tx

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().

◆ out_coc_img

image2D eevee::dof::setup::stabilize::Resources::out_coc_img

Definition at line 140 of file eevee_depth_of_field_setup.bsl.hh.

◆ out_color_img

image2D eevee::dof::setup::stabilize::Resources::out_color_img

Definition at line 139 of file eevee_depth_of_field_setup.bsl.hh.

◆ out_history_img

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().

◆ u_use_history

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().

◆ velocity_tx

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().

◆ views

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().


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