21#define DOF_FAST_GATHER_COC_ERROR 0.05
22#define DOF_GATHER_RING_COUNT 5
23#define DOF_DILATE_RING_COUNT 3
72 depth = (dof.camera_type !=
CAMERA_ORTHO) ? 1.0f / depth : depth;
73 return dof.coc_mul * depth + dof.coc_bias;
86 float side_angle = (2.0f *
EEVEE_PI) / sides_count;
87 return cosf(side_angle * 0.5f) /
95 float side_angle = (2.0f *
EEVEE_PI) / sides_count;
96 float halfside_angle = side_angle * 0.5f;
97 float side =
floorf(theta / side_angle);
102 float local_theta = theta - side * side_angle;
103 float ratio = (local_theta - halfside_angle) / halfside_angle;
106 float opposite = ratio * halfside_len;
109 float final_local_theta =
atanf(opposite / adjacent);
111 return side * side_angle + final_local_theta;
#define BLI_STATIC_ASSERT_ALIGN(st, align)
static float circle_to_polygon_angle(float sides_count, float theta)
static float regular_polygon_side_length(float sides_count)
static float coc_radius_from_camera_depth(DepthOfFieldData dof, float depth)
static float circle_to_polygon_radius(float sides_count, float theta)
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
float scatter_coc_threshold
float2 bokeh_anisotropic_scale_inv
int scatter_sprite_per_row
float2 bokeh_anisotropic_scale
float4 filter_samples_weight
float scatter_neighbor_max_color
float scatter_color_threshold
float filter_center_weight