Blender V5.3
gpu_shader_math_base.bsl.hh File Reference

Go to the source code of this file.

Macros

#define atan2   _atan2

Functions

float endvalue_preserving_mix (float a, float b, float t)
float pow2f (float x)
float pow3f (float x)
float pow4f (float x)
float pow5f (float x)
float pow6f (float x)
float pow7f (float x)
float pow8f (float x)
float square (float v)
float2 square (float2 v)
float3 square (float3 v)
float4 square (float4 v)
float hypot (float x, float y)
float _atan2 (float y, float x)
int ceil_to_multiple (int a, int b)
uint ceil_to_multiple (uint a, uint b)
int divide_ceil (int a, int b)
uint divide_ceil (uint a, uint b)
void min_max (float value, float &min_v, float &max_v)
bool is_equal (float a, float b, const float epsilon)
float sin_from_cos (float c)
float cos_from_sin (float s)
float cos_from_tan (float t)
int midpoint (int a, int b)

Macro Definition Documentation

◆ atan2

Function Documentation

◆ _atan2()

float _atan2 ( float y,
float x )

Definition at line 81 of file gpu_shader_math_base.bsl.hh.

References _atan2(), atan, x, and y.

Referenced by _atan2().

◆ ceil_to_multiple() [1/2]

int ceil_to_multiple ( int a,
int b )

Returns a if it is a multiple of b or the next multiple or b after a . In other words, it is equivalent to divide_ceil(a, b) * b. It is undefined if a is negative or b is not strictly positive.

Definition at line 92 of file gpu_shader_math_base.bsl.hh.

References b, and ceil_to_multiple().

Referenced by ceil_to_multiple(), ceil_to_multiple(), ceil_to_multiple(), ceil_to_multiple< int2 >(), ceil_to_multiple< int3 >(), ceil_to_multiple< int4 >(), ceil_to_multiple< uint2 >(), ceil_to_multiple< uint3 >(), and ceil_to_multiple< uint4 >().

◆ ceil_to_multiple() [2/2]

uint ceil_to_multiple ( uint a,
uint b )

Definition at line 96 of file gpu_shader_math_base.bsl.hh.

References b, and ceil_to_multiple().

◆ cos_from_sin()

◆ cos_from_tan()

◆ divide_ceil() [1/2]

◆ divide_ceil() [2/2]

uint divide_ceil ( uint a,
uint b )

Definition at line 109 of file gpu_shader_math_base.bsl.hh.

References b, and divide_ceil().

◆ endvalue_preserving_mix()

◆ hypot()

◆ is_equal()

◆ midpoint()

◆ min_max()

void min_max ( float value,
float & min_v,
float & max_v )

Component wise, use vector to replace min if it is smaller and max if bigger.

Definition at line 117 of file gpu_shader_math_base.bsl.hh.

References max, min, and min_max().

Referenced by min_max(), min_max(), min_max< float2 >(), min_max< float3 >(), and min_max< float4 >().

◆ pow2f()

float pow2f ( float x)

Definition at line 27 of file gpu_shader_math_base.bsl.hh.

References pow2f(), and x.

Referenced by pow2f(), pow4f(), pow6f(), and pow8f().

◆ pow3f()

float pow3f ( float x)

Definition at line 31 of file gpu_shader_math_base.bsl.hh.

References pow3f(), and x.

Referenced by pow3f(), and pow6f().

◆ pow4f()

float pow4f ( float x)

Definition at line 35 of file gpu_shader_math_base.bsl.hh.

References pow2f(), pow4f(), and x.

Referenced by pow4f(), pow5f(), and pow8f().

◆ pow5f()

◆ pow6f()

float pow6f ( float x)

Definition at line 43 of file gpu_shader_math_base.bsl.hh.

References pow2f(), pow3f(), pow6f(), and x.

Referenced by eevee::lut::GGXBrdfClosure::eval(), pow6f(), and pow7f().

◆ pow7f()

float pow7f ( float x)

Definition at line 47 of file gpu_shader_math_base.bsl.hh.

References pow6f(), pow7f(), and x.

Referenced by pow7f().

◆ pow8f()

float pow8f ( float x)

Definition at line 51 of file gpu_shader_math_base.bsl.hh.

References pow2f(), pow4f(), pow8f(), and x.

Referenced by filters::angle_weight(), and pow8f().

◆ sin_from_cos()

◆ square() [1/4]

float square ( float v)

Definition at line 56 of file gpu_shader_math_base.bsl.hh.

References square().

Referenced by eevee::lut::burley_sss_translucency(), bxdf_ggx_D(), bxdf_ggx_dominant_direction_reflection(), bxdf_ggx_dominant_direction_transmission(), bxdf_ggx_eval_reflection(), bxdf_ggx_eval_refraction(), bxdf_ggx_sample_reflection(), bxdf_ggx_sample_refraction(), bxdf_ggx_sample_vndf(), bxdf_ggx_smith_G1(), eevee::motion_blur::clamp_motion_and_get_length(), closure_evaluate_pdf(), eevee::deferred::combine_frag(), eevee::film::Film::combined_neighbor_boundbox(), eevee::lightprobe::sphere::cone_cosine_from_roughness(), cos_from_sin(), cos_from_tan(), eevee::dof::Accumulator::dof_gather_accumulate_center_sample(), eevee::dof::Accumulator::dof_gather_accumulator(), eevee::dof::resolve::Resources::dof_neighborhood_clamp(), dof_sample_weight(), dof_sample_weight(), eevee::dof::Accumulator::dof_slight_focus_gather(), eevee::fast_gi::eval(), eevee::ltc::evaluate_disk(), F0_from_f0(), F0_from_ior(), eevee::lightprobe::volume::VolumeOffset::find_closest_surfel(), eevee::ltc::detail::form_factor_attenuation(), eevee::dof::scatter::frag_main(), eevee::lut::GGXBrdfClosure::from_coords(), eevee::lut::GGXBsdfClosure::from_coords(), eevee::lut::GGXBtdfGt1Closure::from_coords(), from_up_axis(), filters::gaussian_factor(), eevee::lightprobe::volume::grid_bias_sample_coord(), intersect(), light_influence_attenuation(), light_point_light(), light_sphere_disk_radius(), eevee::lightprobe::volume::load_grid(), eevee::raytracing::denoise::DenoiseTemporal::local_statistics_get(), eevee::lightprobe::sphere::lod_to_roughness(), eevee::lut::GGXBsdfData::lut_coords_get(), eevee::camera::mirror_ball_to_direction(), eevee::deferred::planar_eval_frag(), filters::planar_weight(), principled_eval_translucent(), blender::eevee::random_in_tile(), eevee::ray_generate_direction(), eevee::lightprobe::sphere::roughness_to_mix_fac(), sample_circle(), sample_hemisphere(), sample_uniform_cone(), eevee::lightprobe::sphere::sample_weight(), eevee::shadow_map_trace(), sin_from_cos(), slab_transmittance_at_angle(), eevee::raytracing::denoise::spatial_main(), eevee::deferred::sphere_eval_frag(), square(), square(), square(), square(), eevee::lightprobe::sphere::sun_extraction(), eevee::raytracing::denoise::temporal_main(), blender::tests::TEST(), thin_glass_transmission_roughness(), and eevee::volume::volume_light().

◆ square() [2/4]

float2 square ( float2 v)

Definition at line 60 of file gpu_shader_math_base.bsl.hh.

References square().

◆ square() [3/4]

float3 square ( float3 v)

Definition at line 64 of file gpu_shader_math_base.bsl.hh.

References square().

◆ square() [4/4]

float4 square ( float4 v)

Definition at line 68 of file gpu_shader_math_base.bsl.hh.

References square().