Differential D16990 Diff 60050 source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_reduce_comp.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_reduce_comp.glsl
| Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | float dof_scatter_coc_radius_rejection(float coc) | ||||
| return saturate((abs(coc) - dof_buf.scatter_coc_threshold) * rejection_hardness); | return saturate((abs(coc) - dof_buf.scatter_coc_threshold) * rejection_hardness); | ||||
| } | } | ||||
| float fast_luma(vec3 color) | float fast_luma(vec3 color) | ||||
| { | { | ||||
| return (2.0 * color.g) + color.r + color.b; | return (2.0 * color.g) + color.r + color.b; | ||||
| } | } | ||||
| const uint cache_size = gl_WorkGroupSize.x; | #define cache_size (gl_WorkGroupSize.x) | ||||
| shared vec4 color_cache[cache_size][cache_size]; | shared vec4 color_cache[cache_size][cache_size]; | ||||
| shared float coc_cache[cache_size][cache_size]; | shared float coc_cache[cache_size][cache_size]; | ||||
| shared float do_scatter[cache_size][cache_size]; | shared float do_scatter[cache_size][cache_size]; | ||||
| void main() | void main() | ||||
| { | { | ||||
| ivec2 texel = min(ivec2(gl_GlobalInvocationID.xy), imageSize(inout_color_lod0_img) - 1); | ivec2 texel = min(ivec2(gl_GlobalInvocationID.xy), imageSize(inout_color_lod0_img) - 1); | ||||
| uvec2 texel_local = gl_LocalInvocationID.xy; | uvec2 texel_local = gl_LocalInvocationID.xy; | ||||
| ▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines | |||||