49 int2 tile_co =
int2(global_id.xy / DOF_TILES_SIZE);
53 float base_radius, min_radius, min_intersectable_radius;
55 if (
gather.accumulator.consts.is_foreground) {
73 min_intersectable_radius *= 0.5f;
84 out_occlusion =
float2(0.0f, 0.0f);
86 else if (do_fast_gather) {
92 min_intersectable_radius,
99 else if (do_density_change) {
105 min_intersectable_radius,
118 min_intersectable_radius,
126 int2 out_texel =
int2(global_id.xy);
129 imageStore(srt.out_occlusion_img, out_texel, out_occlusion.xyxy);
152 int2 tile_co =
int2(global_id.xy / DOF_TILES_SIZE);
158 float min_intersectable_radius = dof_tile_large_coc;
166 min_intersectable_radius *= 0.5f;
169 float out_weight = 0.0f;
175 else if (do_fast_gather) {
181 min_intersectable_radius,
194 min_intersectable_radius,
202 int2 out_texel =
int2(global_id.xy);
213 .is_hole_fill =
false,
215 .is_foreground =
false,
220 .is_hole_fill =
false,
222 .is_foreground =
false,
227 .is_hole_fill =
false,
229 .is_foreground =
true,
234 .is_hole_fill =
false,
236 .is_foreground =
true,
242 .is_hole_fill =
true,
244 .is_foreground =
false,
PipelineCompute eevee_depth_of_field_hole_fill(eevee::dof::hole_fill::comp_main, eevee::dof::AccumulatorConstants{ .is_hole_fill=true,.is_resolve=false,.is_foreground=false,.use_lut=false, })
PipelineCompute eevee_depth_of_field_gather_background_no_lut(eevee::dof::gather::comp_main, eevee::dof::AccumulatorConstants{ .is_hole_fill=false,.is_resolve=false,.is_foreground=false,.use_lut=false, })
PipelineCompute eevee_depth_of_field_gather_foreground_lut(eevee::dof::gather::comp_main, eevee::dof::AccumulatorConstants{ .is_hole_fill=false,.is_resolve=false,.is_foreground=true,.use_lut=true, })
PipelineCompute eevee_depth_of_field_gather_background_lut(eevee::dof::gather::comp_main, eevee::dof::AccumulatorConstants{ .is_hole_fill=false,.is_resolve=false,.is_foreground=false,.use_lut=true, })
PipelineCompute eevee_depth_of_field_gather_foreground_no_lut(eevee::dof::gather::comp_main, eevee::dof::AccumulatorConstants{ .is_hole_fill=false,.is_resolve=false,.is_foreground=true,.use_lut=false, })
bool dof_do_fast_gather(float max_absolute_coc, float min_absolute_coc, const bool is_foreground, const bool is_resolve)
CocTilePrediction dof_coc_tile_prediction_get(CocTile tile, const bool is_resolve)
CocTile dof_coc_tile_load(image2D tiles_fg_img, image2D tiles_bg_img, int2 texel)
#define image(slot, qualifiers, format)
#define global_invocation_id
ImageBase< float, 2 > image2D
IMG_TEMPLATE void imageStore(T &, IntCoord, DataVec)
SamplerBase< float, 2 > sampler2D
ccl_gpu_kernel_postfix ccl_global KernelWorkTile * tiles
void comp_main(Resources &srt, Gather &gather, const Tiles &tiles, const uint3 global_id)
void comp_main(Gather &gather, const Tiles &tiles, const uint3 global_id)
float fg_max_intersectable_coc
float bg_min_intersectable_coc
bool dof_do_density_change(float base_radius, float min_intersectable_radius)
AccumulatorConstants consts
void dof_gather_accumulator(float2 frag_coord, sampler2D color_tx, sampler2D color_bilinear_tx, sampler2D coc_tx, float base_radius, float min_intersectable_radius, const bool do_fast_gather, const bool do_density_change, float4 &out_color, float &out_weight, float2 &out_occlusion)
sampler2D color_bilinear_tx
image2D out_occlusion_img