|
Blender
V2.93
|
Go to the source code of this file.
Macros | |
| #define | GET_COLOR(image) make_float3(image[idx], image[idx + pass_stride], image[idx + 2 * pass_stride]) |
| #define | SET_COLOR(image, color) |
Functions | |
| CCL_NAMESPACE_BEGIN ccl_device void | kernel_filter_divide_shadow (int sample, CCL_FILTER_TILE_INFO, int x, int y, ccl_global float *unfilteredA, ccl_global float *unfilteredB, ccl_global float *sampleVariance, ccl_global float *sampleVarianceV, ccl_global float *bufferVariance, int4 rect, int buffer_pass_stride, int buffer_denoising_offset) |
| ccl_device void | kernel_filter_get_feature (int sample, CCL_FILTER_TILE_INFO, int m_offset, int v_offset, int x, int y, ccl_global float *mean, ccl_global float *variance, float scale, int4 rect, int buffer_pass_stride, int buffer_denoising_offset) |
| ccl_device void | kernel_filter_write_feature (int sample, int x, int y, int4 buffer_params, ccl_global float *from, ccl_global float *buffer, int out_offset, int4 rect) |
| ccl_device void | kernel_filter_detect_outliers (int x, int y, ccl_global float *in, ccl_global float *variance_out, ccl_global float *depth, ccl_global float *image_out, int4 rect, int pass_stride) |
| ccl_device void | kernel_filter_combine_halves (int x, int y, ccl_global float *mean, ccl_global float *variance, ccl_global float *a, ccl_global float *b, int4 rect, int r) |
| #define GET_COLOR | ( | image | ) | make_float3(image[idx], image[idx + pass_stride], image[idx + 2 * pass_stride]) |
Definition at line 148 of file filter_prefilter.h.
| #define SET_COLOR | ( | image, | |
| color | |||
| ) |
Definition at line 150 of file filter_prefilter.h.
| ccl_device void kernel_filter_combine_halves | ( | int | x, |
| int | y, | ||
| ccl_global float * | mean, | ||
| ccl_global float * | variance, | ||
| ccl_global float * | a, | ||
| ccl_global float * | b, | ||
| int4 | rect, | ||
| int | r | ||
| ) |
Definition at line 263 of file filter_prefilter.h.
References Freestyle::a, align_up(), max, min, r, v, int4::w, int4::x, x, int4::y, y, and int4::z.
Referenced by filter_combine_halves().
| ccl_device void kernel_filter_detect_outliers | ( | int | x, |
| int | y, | ||
| ccl_global float * | in, | ||
| ccl_global float * | variance_out, | ||
| ccl_global float * | depth, | ||
| ccl_global float * | image_out, | ||
| int4 | rect, | ||
| int | pass_stride | ||
| ) |
Definition at line 155 of file filter_prefilter.h.
References align_up(), average(), ccl_global, color_highlight_compress(), GET_COLOR, L, make_float3, max, min, SET_COLOR, sqr(), sqrtf, int4::w, int4::x, float3::x, x, int4::y, float3::y, y, y1, int4::z, and float3::z.
Referenced by filter_detect_outliers().
| CCL_NAMESPACE_BEGIN ccl_device void kernel_filter_divide_shadow | ( | int | sample, |
| CCL_FILTER_TILE_INFO | , | ||
| int | x, | ||
| int | y, | ||
| ccl_global float * | unfilteredA, | ||
| ccl_global float * | unfilteredB, | ||
| ccl_global float * | sampleVariance, | ||
| ccl_global float * | sampleVarianceV, | ||
| ccl_global float * | bufferVariance, | ||
| int4 | rect, | ||
| int | buffer_pass_stride, | ||
| int | buffer_denoising_offset | ||
| ) |
First step of the shadow prefiltering, performs the shadow division and stores all data in a nice and easy rectangular array that can be passed to the NLM filter.
Calculates:
| unfiltered | Contains the two half images of the shadow feature pass |
| sampleVariance | The sample-based variance calculated in the kernel. Note: This calculation is biased in general, and especially here since the variance of the ratio can only be approximated. |
| sampleVarianceV | Variance of the sample variance estimation, quite noisy (since it's essentially the buffer variance of the two variance halves) |
| bufferVariance | The buffer-based variance of the shadow feature. Unbiased, but quite noisy. |
Definition at line 33 of file filter_prefilter.h.
References align_up(), ccl_get_tile_buffer, ccl_global, ccl_restrict, max, blender::compositor::sample(), stride, int4::x, x, int4::y, y, and int4::z.
Referenced by filter_divide_shadow().
| ccl_device void kernel_filter_get_feature | ( | int | sample, |
| CCL_FILTER_TILE_INFO | , | ||
| int | m_offset, | ||
| int | v_offset, | ||
| int | x, | ||
| int | y, | ||
| ccl_global float * | mean, | ||
| ccl_global float * | variance, | ||
| float | scale, | ||
| int4 | rect, | ||
| int | buffer_pass_stride, | ||
| int | buffer_denoising_offset | ||
| ) |
Definition at line 89 of file filter_prefilter.h.
References align_up(), ccl_get_tile_buffer, ccl_global, max, blender::compositor::sample(), int4::x, x, int4::y, y, and int4::z.
Referenced by filter_get_feature().
| ccl_device void kernel_filter_write_feature | ( | int | sample, |
| int | x, | ||
| int | y, | ||
| int4 | buffer_params, | ||
| ccl_global float * | from, | ||
| ccl_global float * | buffer, | ||
| int | out_offset, | ||
| int4 | rect | ||
| ) |
Definition at line 130 of file filter_prefilter.h.
References align_up(), buffer, ccl_global, from, int4::x, x, int4::y, y, and int4::z.
Referenced by filter_write_feature().