58 constexpr uint cache_size = uint(DOF_FILTER_GROUP_SIZE + 2);
62 for (
int y = 0;
y < 2;
y++) {
63 for (
int x = 0;
x < 2;
x++) {
65 int2 cache_texel =
int2(local_id.xy) + offset;
162 srt.init(global_id, local_id);
168 rows[
y] =
filter_lmh(srt.fetch_sample(texel[0] + 0, texel[1] +
y),
169 srt.fetch_sample(texel[0] + 1, texel[1] +
y),
170 srt.fetch_sample(texel[0] + 2, texel[1] +
y));
181 int2 out_texel =
int2(global_id.xy);
PipelineCompute eevee_depth_of_field_filter(eevee::dof::filter_pass::comp_main)
#define image(slot, qualifiers, format)
#define global_invocation_id
#define local_invocation_id
bool all(VecOp< bool, D >) RET
VecBase< bool, D > lessThan(VecOp< T, D >, VecOp< T, D >) RET
constexpr T clamp(T, U, U) RET
ImageBase< float, 2 > image2D
IMG_TEMPLATE void imageStore(T &, IntCoord, DataVec)
TEX_TEMPLATE DataVec texelFetch(T, IntCoord, int) RET
SamplerBase< float, 2 > sampler2D
TEX_TEMPLATE SizeVec textureSize(T, int) RET
FilterSample filter_min(FilterSample a, FilterSample b)
FilterSample filter_max(FilterSample a, FilterSample b)
FilterSample filter_median(FilterSample s1, FilterSample s2, FilterSample s3)
FilterLmhResult filter_lmh(FilterSample s1, FilterSample s2, FilterSample s3)
void comp_main(Resources &srt, const uint3 global_id, const uint3 local_id)
void init(uint3 global_id, uint3 local_id)
float weight_cache[DOF_FILTER_GROUP_SIZE+2][DOF_FILTER_GROUP_SIZE+2]
FilterSample fetch_sample(int x, int y) const
float4 color_cache[DOF_FILTER_GROUP_SIZE+2][DOF_FILTER_GROUP_SIZE+2]