Differential D16243 Diff 58431 source/blender/draw/engines/eevee/shaders/effect_dof_dilate_tiles_frag.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/shaders/effect_dof_dilate_tiles_frag.glsl
| /** | /** | ||||
| * Tile dilate pass: Takes the 8x8 Tiles buffer and converts dilates the tiles with large CoC to | * Tile dilate pass: Takes the 8x8 Tiles buffer and converts dilates the tiles with large CoC to | ||||
| * their neighborhood. This pass is repeated multiple time until the maximum CoC can be covered. | * their neighborhood. This pass is repeated multiple time until the maximum CoC can be covered. | ||||
| */ | */ | ||||
| #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) | #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) | ||||
| /* 1/16th of fullres. */ | |||||
| uniform sampler2D cocTilesFgBuffer; | |||||
| uniform sampler2D cocTilesBgBuffer; | |||||
| uniform int ringCount; | |||||
| uniform int ringWidthMultiplier; | |||||
| uniform bool dilateSlightFocus; | |||||
| /* 1/16th of fullres. Same format as input. */ | |||||
| layout(location = 0) out vec4 outFgCoc; | |||||
| layout(location = 1) out vec3 outBgCoc; | |||||
| const float tile_to_fullres_factor = float(DOF_TILE_DIVISOR); | const float tile_to_fullres_factor = float(DOF_TILE_DIVISOR); | ||||
| /* Error introduced by the random offset of the gathering kernel's center. */ | /* Error introduced by the random offset of the gathering kernel's center. */ | ||||
| const float bluring_radius_error = 1.0 + 1.0 / (gather_ring_count + 0.5); | const float bluring_radius_error = 1.0 + 1.0 / (gather_ring_count + 0.5); | ||||
| void main() | void main() | ||||
| { | { | ||||
| ivec2 center_tile_pos = ivec2(gl_FragCoord.xy); | ivec2 center_tile_pos = ivec2(gl_FragCoord.xy); | ||||
| ▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines | |||||