Differential D16243 Diff 58431 source/blender/draw/engines/eevee/shaders/effect_dof_filter_frag.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/shaders/effect_dof_filter_frag.glsl
| /** | /** | ||||
| * Gather Filter pass: Filter the gather pass result to reduce noise. | * Gather Filter pass: Filter the gather pass result to reduce noise. | ||||
| * | * | ||||
| * This is a simple 3x3 median filter to avoid dilating highlights with a 3x3 max filter even if | * This is a simple 3x3 median filter to avoid dilating highlights with a 3x3 max filter even if | ||||
| * cheaper. | * cheaper. | ||||
| */ | */ | ||||
| #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) | #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) | ||||
| uniform sampler2D colorBuffer; | |||||
| uniform sampler2D weightBuffer; | |||||
| in vec4 uvcoordsvar; | |||||
| layout(location = 0) out vec4 outColor; | |||||
| layout(location = 1) out float outWeight; | |||||
| /* From: | /* From: | ||||
| * Implementing Median Filters in XC4000E FPGAs | * Implementing Median Filters in XC4000E FPGAs | ||||
| * JOHN L. SMITH, Univision Technologies Inc., Billerica, MA | * JOHN L. SMITH, Univision Technologies Inc., Billerica, MA | ||||
| * http://users.utcluj.ro/~baruch/resources/Image/xl23_16.pdf | * http://users.utcluj.ro/~baruch/resources/Image/xl23_16.pdf | ||||
| * Figure 1 */ | * Figure 1 */ | ||||
| /* Outputs low median and high value of a triple. */ | /* Outputs low median and high value of a triple. */ | ||||
| void lmh(vec4 s1, vec4 s2, vec4 s3, out vec4 l, out vec4 m, out vec4 h) | void lmh(vec4 s1, vec4 s2, vec4 s3, out vec4 l, out vec4 m, out vec4 h) | ||||
| ▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines | |||||