Differential D16279 Diff 56892 source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/realtime_compositor/algorithms/COM_algorithm_parallel_reduction.hh
| Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | |||||
| * texture and the given subtrahend, using the given luminance coefficients to compute the | * texture and the given subtrahend, using the given luminance coefficients to compute the | ||||
| * luminance. This can be used to compute the standard deviation if the given subtrahend is the | * luminance. This can be used to compute the standard deviation if the given subtrahend is the | ||||
| * mean. */ | * mean. */ | ||||
| float sum_luminance_squared_difference(Context &context, | float sum_luminance_squared_difference(Context &context, | ||||
| GPUTexture *texture, | GPUTexture *texture, | ||||
| float3 luminance_coefficients, | float3 luminance_coefficients, | ||||
| float subtrahend); | float subtrahend); | ||||
| /* -------------------------------------------------------------------- | |||||
| * Maximum Reductions. | |||||
| */ | |||||
| /* Computes the maximum float of all pixels in the given float texture, limited to the given range. | |||||
| * Values outside of the given range are ignored. If non of the pixel values are in the range, the | |||||
| * lower bound of the range is returned. For instance, if the given range is [-10, 10] and the | |||||
| * image contains the values {2, 5, 11}, the maximum will be 5, since 11 is outside of the range. | |||||
| * This is particularly useful for Z Depth normalization, since Z Depth can contain near infinite | |||||
| * values, so enforcing an upper bound is beneficial. */ | |||||
| float maximum_float_in_range(Context &context, | |||||
| GPUTexture *texture, | |||||
| float lower_bound, | |||||
| float upper_bound); | |||||
| /* -------------------------------------------------------------------- | |||||
| * Minimum Reductions. | |||||
| */ | |||||
| /* Computes the minimum float of all pixels in the given float texture, limited to the given range. | |||||
| * Values outside of the given range are ignored. If non of the pixel values are in the range, the | |||||
| * upper bound of the range is returned. For instance, if the given range is [-10, 10] and the | |||||
| * image contains the values {-11, 2, 5}, the minimum will be 2, since -11 is outside of the range. | |||||
| * This is particularly useful for Z Depth normalization, since Z Depth can contain near infinite | |||||
| * values, so enforcing a lower bound is beneficial. */ | |||||
| float minimum_float_in_range(Context &context, | |||||
| GPUTexture *texture, | |||||
| float lower_bound, | |||||
| float upper_bound); | |||||
| } // namespace blender::realtime_compositor | } // namespace blender::realtime_compositor | ||||