Skip to main content

Module math

Module math 

Source

Constants§

BASE_SAMPLES

Functions§

atan2f
Just a simple port from https://mazzo.li/posts/vectorized-atan2.html This is a fast port mostly without branching
calculate_coverage_weight
Calculate the coverage weight for a pixel position in a ring
calculate_normalized_coverage_weight
Calculate the normalized coverage weight for a pixel position in a ring
ceilf
cosf
floorf
get_coordinates_on_circle
Calculate the coordinates in X and Y on a circle by the radius.
get_points_for_ring
Calculate the base number of points to distribute along a ring
get_real_coordinates
Get the coordinates in screen-space based on the full region
get_sample_weight
Get the interpolated sample weight based on Circle of Confusion (CoC)
log2f
mix
Linearly interpolates between two values.
mix_vec
Linearly interpolates between two arrays of the same size.
neg_pow
Function that allows pow to be in the negative.
powf
saturate
sinf
smoothstep
sqrt