Differential D16990 Diff 60050 source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_accumulator_lib.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_accumulator_lib.glsl
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | struct DofGatherData { | ||||
| float dist; /* TODO remove */ | float dist; /* TODO remove */ | ||||
| /* For scatter occlusion. */ | /* For scatter occlusion. */ | ||||
| float coc; | float coc; | ||||
| float coc_sqr; | float coc_sqr; | ||||
| /* For ring bucket merging. */ | /* For ring bucket merging. */ | ||||
| float transparency; | float transparency; | ||||
| float layer_opacity; | float layer_opacity; | ||||
| #ifdef GPU_METAL | |||||
| /* Explicit constructors -- To support GLSL syntax. */ | |||||
| inline DofGatherData() = default; | |||||
| inline DofGatherData(vec4 in_color, | |||||
| float in_weight, | |||||
| float in_dist, | |||||
| float in_coc, | |||||
| float in_coc_sqr, | |||||
| float in_transparency, | |||||
| float in_layer_opacity) | |||||
| : color(in_color), | |||||
| weight(in_weight), | |||||
| dist(in_dist), | |||||
| coc(in_coc), | |||||
| coc_sqr(in_coc_sqr), | |||||
| transparency(in_transparency), | |||||
| layer_opacity(in_layer_opacity) | |||||
| { | |||||
| } | |||||
| #endif | |||||
| }; | }; | ||||
| #define GATHER_DATA_INIT DofGatherData(vec4(0.0), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) | #define GATHER_DATA_INIT DofGatherData(vec4(0.0), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) | ||||
| /* Intersection with the center of the kernel. */ | /* Intersection with the center of the kernel. */ | ||||
| float dof_intersection_weight(float coc, float distance_from_center, float intersection_multiplier) | float dof_intersection_weight(float coc, float distance_from_center, float intersection_multiplier) | ||||
| { | { | ||||
| if (no_smooth_intersection) { | if (no_smooth_intersection) { | ||||
| ▲ Show 20 Lines • Show All 610 Lines • Show Last 20 Lines | |||||