Differential D16243 Diff 58431 source/blender/draw/engines/eevee/shaders/effect_dof_resolve_frag.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/shaders/effect_dof_resolve_frag.glsl
| /** | /** | ||||
| * Recombine Pass: Load separate convolution layer and composite with self slight defocus | * Recombine Pass: Load separate convolution layer and composite with self slight defocus | ||||
| * convolution and in-focus fields. | * convolution and in-focus fields. | ||||
| * | * | ||||
| * The halfres gather methods are fast but lack precision for small CoC areas. To fix this we | * The halfres gather methods are fast but lack precision for small CoC areas. To fix this we | ||||
| * do a bruteforce gather to have a smooth transition between in-focus and defocus regions. | * do a bruteforce gather to have a smooth transition between in-focus and defocus regions. | ||||
| */ | */ | ||||
| #pragma BLENDER_REQUIRE(common_utiltex_lib.glsl) | #pragma BLENDER_REQUIRE(common_utiltex_lib.glsl) | ||||
| #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) | #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) | ||||
| uniform sampler2D fullResColorBuffer; | |||||
| uniform sampler2D fullResDepthBuffer; | |||||
| uniform sampler2D bgColorBuffer; | |||||
| uniform sampler2D bgWeightBuffer; | |||||
| uniform sampler2D bgTileBuffer; | |||||
| uniform sampler2D fgColorBuffer; | |||||
| uniform sampler2D fgWeightBuffer; | |||||
| uniform sampler2D fgTileBuffer; | |||||
| uniform sampler2D holefillColorBuffer; | |||||
| uniform sampler2D holefillWeightBuffer; | |||||
| uniform sampler2D bokehLut; | |||||
| uniform float bokehMaxSize; | |||||
| in vec4 uvcoordsvar; | |||||
| out vec4 fragColor; | |||||
| void dof_slight_focus_gather(float radius, out vec4 out_color, out float out_weight) | void dof_slight_focus_gather(float radius, out vec4 out_color, out float out_weight) | ||||
| { | { | ||||
| /* offset coord to avoid correlation with sampling pattern. */ | /* offset coord to avoid correlation with sampling pattern. */ | ||||
| vec4 noise = texelfetch_noise_tex(gl_FragCoord.xy + 7.0); | vec4 noise = texelfetch_noise_tex(gl_FragCoord.xy + 7.0); | ||||
| DofGatherData fg_accum = GATHER_DATA_INIT; | DofGatherData fg_accum = GATHER_DATA_INIT; | ||||
| DofGatherData bg_accum = GATHER_DATA_INIT; | DofGatherData bg_accum = GATHER_DATA_INIT; | ||||
| ▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines | |||||