|
Blender V5.3
|
Go to the source code of this file.
| float angle_normalized | ( | VecT | v1, |
| VecT | v2 ) |
Return the shortest angle in radians between the 2 vectors.
Definition at line 123 of file gpu_shader_math_vector.bsl.hh.
References angle_normalized(), asin, clamp(), dot(), length(), M_PI, and normalize.
Referenced by align_rotation_to_vector_auto_pivot(), angle_normalized(), angle_normalized< float2 >(), angle_normalized< float3 >(), angle_normalized< float4 >(), angle_signed_on_axis_v3v3_v3(), compare_vector_direction_equal(), compare_vector_direction_greater_equal(), compare_vector_direction_greater_than(), compare_vector_direction_less_equal(), compare_vector_direction_less_than(), and compare_vector_direction_not_equal().
| template float angle_normalized< float2 > | ( | float2 | , |
| float2 | ) |
References angle_normalized().
| template float angle_normalized< float3 > | ( | float3 | , |
| float3 | ) |
References angle_normalized().
| template float angle_normalized< float4 > | ( | float4 | , |
| float4 | ) |
References angle_normalized().
| VecT ceil_to_multiple | ( | VecT | a, |
| VecT | 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 37 of file gpu_shader_math_vector.bsl.hh.
References b, and ceil_to_multiple().
| template int2 ceil_to_multiple< int2 > | ( | int2 | , |
| int2 | ) |
References ceil_to_multiple().
| template int3 ceil_to_multiple< int3 > | ( | int3 | , |
| int3 | ) |
References ceil_to_multiple().
| template int4 ceil_to_multiple< int4 > | ( | int4 | , |
| int4 | ) |
References ceil_to_multiple().
| template uint2 ceil_to_multiple< uint2 > | ( | uint2 | , |
| uint2 | ) |
References ceil_to_multiple().
| template uint3 ceil_to_multiple< uint3 > | ( | uint3 | , |
| uint3 | ) |
References ceil_to_multiple().
| template uint4 ceil_to_multiple< uint4 > | ( | uint4 | , |
| uint4 | ) |
References ceil_to_multiple().
| float distance_manhattan | ( | VecT | a, |
| VecT | b ) |
Return the manhattan distance between a and b.
Definition at line 101 of file gpu_shader_math_vector.bsl.hh.
References b, distance_manhattan(), and length_manhattan().
Referenced by distance_manhattan(), distance_manhattan< float2 >(), distance_manhattan< float3 >(), and distance_manhattan< float4 >().
| template float distance_manhattan< float2 > | ( | float2 | , |
| float2 | ) |
References distance_manhattan().
| template float distance_manhattan< float3 > | ( | float3 | , |
| float3 | ) |
References distance_manhattan().
| template float distance_manhattan< float4 > | ( | float4 | , |
| float4 | ) |
References distance_manhattan().
| float distance_squared | ( | VecT | a, |
| VecT | b ) |
Return the squared distance between a and b.
Definition at line 112 of file gpu_shader_math_vector.bsl.hh.
References b, distance_squared(), and length_squared().
Referenced by blender::bone_envelope_falloff(), blender::ed::sculpt_paint::greasepencil::brush_point_influence_mask(), blender::cast_ray_highpoly(), blender::noise::compute_2d_gabor_kernel(), compute_2d_gabor_kernel(), compute_2d_gabor_kernel(), blender::noise::compute_3d_gabor_kernel(), compute_3d_gabor_kernel(), compute_3d_gabor_kernel(), blender::nodes::node_composite_lens_distortion_cc::compute_chromatic_distortion_scale(), blender::nodes::node_composite_lens_distortion_cc::compute_distortion_scale(), blender::nodes::node_composite_lens_distortion_cc::compute_number_of_integration_steps(), distance_squared(), distance_squared< float2 >(), distance_squared< float3 >(), distance_squared< float4 >(), blender::distfactor_to_bone(), blender::ed_tracking_pick_plane_track(), blender::ed_tracking_pick_point_track(), blender::meshintersect::fill_crossdata_for_intersect(), overlay::edit_vert::frag(), blender::nodes::node_composite_lens_distortion_cc::integrate_distortion(), intersect(), builtin::socket::main_frag(), blender::mouse_to_closest_corners_edge_distance_squared(), blender::mouse_to_closest_pattern_corner_distance_squared(), blender::ed::curves::pen_tool::pen_find_closest_edge_point(), blender::ed::curves::pen_tool::pen_find_closest_handle(), blender::ed::curves::pen_tool::pen_find_closest_point(), blender::ed::greasepencil::primitive_check_ui_hover(), blender::nodes::node_composite_lens_distortion_cc::radial_lens_distortion(), and blender::meshintersect::remove_non_constraint_edges_leave_valid_bmesh().
| template float distance_squared< float2 > | ( | float2 | , |
| float2 | ) |
References distance_squared().
| template float distance_squared< float3 > | ( | float3 | , |
| float3 | ) |
References distance_squared().
| template float distance_squared< float4 > | ( | float4 | , |
| float4 | ) |
References distance_squared().
| VecT divide_ceil | ( | VecT | a, |
| VecT | b ) |
Integer division that returns the ceiling, instead of flooring like normal C division. It is undefined if a is negative or b is not strictly positive.
Definition at line 52 of file gpu_shader_math_vector.bsl.hh.
References b, and divide_ceil().
| template int2 divide_ceil< int2 > | ( | int2 | , |
| int2 | ) |
References divide_ceil().
| template int3 divide_ceil< int3 > | ( | int3 | , |
| int3 | ) |
References divide_ceil().
| template int4 divide_ceil< int4 > | ( | int4 | , |
| int4 | ) |
References divide_ceil().
| template uint2 divide_ceil< uint2 > | ( | uint2 | , |
| uint2 | ) |
References divide_ceil().
| template uint3 divide_ceil< uint3 > | ( | uint3 | , |
| uint3 | ) |
References divide_ceil().
| template uint4 divide_ceil< uint4 > | ( | uint4 | , |
| uint4 | ) |
References divide_ceil().
| int dominant_axis | ( | float3 | a | ) |
Return the index of the component with the greatest absolute value.
Definition at line 185 of file gpu_shader_math_vector.bsl.hh.
References abs, b, and dominant_axis().
Referenced by dominant_axis(), orthogonal< float3 >(), and eevee::surf_capture().
| VecT endvalue_preserving_mix | ( | VecT | a, |
| VecT | b, | ||
| FacT | t ) |
Definition at line 21 of file gpu_shader_math_vector.bsl.hh.
References b, and endvalue_preserving_mix().
References endvalue_preserving_mix().
References endvalue_preserving_mix().
References endvalue_preserving_mix().
References endvalue_preserving_mix().
References endvalue_preserving_mix().
References endvalue_preserving_mix().
| VecT interpolate | ( | VecT | a, |
| VecT | b, | ||
| float | t ) |
Per component linear interpolation.
Definition at line 163 of file gpu_shader_math_vector.bsl.hh.
References b, interpolate(), and mix.
References interpolate().
References interpolate().
References interpolate().
| float length_manhattan | ( | VecT | a | ) |
Return the manhattan length of a. This is also the sum of the absolute value of all components.
Definition at line 79 of file gpu_shader_math_vector.bsl.hh.
References abs, dot(), and length_manhattan().
Referenced by distance_manhattan(), length_manhattan(), length_manhattan< float2 >(), length_manhattan< float3 >(), length_manhattan< float4 >(), gbuffer::normal_pack(), and to_euler().
| template float length_manhattan< float2 > | ( | float2 | ) |
References length_manhattan().
| template float length_manhattan< float3 > | ( | float3 | ) |
References length_manhattan().
| template float length_manhattan< float4 > | ( | float4 | ) |
References length_manhattan().
| float length_squared | ( | VecT | a | ) |
Return the length squared of a.
Definition at line 90 of file gpu_shader_math_vector.bsl.hh.
References dot(), and length_squared().
Referenced by eevee::raytracing::denoise::bilateral_main(), bxdf_ggx_sample_reflection(), eevee::motion_blur::clamp_motion_and_get_length(), compute_2d_gabor_kernel(), compute_2d_gabor_noise_cell(), compute_3d_gabor_kernel(), compute_3d_gabor_noise_cell(), distance_squared(), eevee::fast_gi::eval(), eevee::lightprobe::volume::VolumeOffset::find_closest_surfel(), eevee::lightprobe::sphere::display::frag_main(), eevee::lightprobe::volume::display::frag_main(), ScreenSpaceRay::from_start_end(), workbench::shadow::GeometryShaderEmulator::geometry_main(), blender::bke::greasepencil::get_local_to_stroke_matrix(), length_squared(), length_squared< float2 >(), length_squared< float3 >(), length_squared< float4 >(), light_spot_attenuation(), line_plane_intersect_dist(), eevee::lightprobe::volume::load_grid(), eevee::camera::mirror_ball_to_direction(), normalize_and_get_length(), normalize_fallback(), eevee::film::Film::panoramic_sample_get(), safe_normalize_and_get_length(), eevee::film::Film::sample_get(), eevee::fast_gi::SampleInput::sample_weight_get(), eevee::shadow_map_trace_sample(), eevee::shadow_map_trace_sample(), eevee::shadow_ray_generate_punctual(), and eevee::shadow::usage::TagUsageTransparent::step_bounding_sphere().
| template float length_squared< float2 > | ( | float2 | ) |
References length_squared().
| template float length_squared< float3 > | ( | float3 | ) |
References length_squared().
| template float length_squared< float4 > | ( | float4 | ) |
References length_squared().
| VecT midpoint | ( | VecT | a, |
| VecT | b ) |
Return half-way point between a and b.
Definition at line 174 of file gpu_shader_math_vector.bsl.hh.
References b, and midpoint().
| void min_max | ( | VecT | vector, |
| VecT & | min_v, | ||
| VecT & | max_v ) |
Component wise, use vector to replace min if it is smaller and max if bigger.
Definition at line 66 of file gpu_shader_math_vector.bsl.hh.
| VecT normalize_and_get_length | ( | VecT | vector, |
| float & | out_length ) |
Return normalized version of the vector and its length.
Definition at line 144 of file gpu_shader_math_vector.bsl.hh.
References length_squared(), normalize_and_get_length(), and sqrt.
Referenced by bxdf_ggx_sample_reflection(), LightVector::get(), LightVector::get_shape_closest(), eevee::lightprobe::volume::grid_bias_sample_coord(), normalize_and_get_length(), normalize_and_get_length< float2 >(), normalize_and_get_length< float3 >(), normalize_and_get_length< float4 >(), normalize_and_get_size(), normalize_and_get_size(), draw::gsplat::AxisTuple::pack(), eevee::fast_gi::projected_normal_to_plane_angle_and_length(), eevee::shadow_eval(), and eevee::shadow_ray_generate_punctual().
| template float2 normalize_and_get_length< float2 > | ( | float2 | , |
| float & | ) |
References normalize_and_get_length().
| template float3 normalize_and_get_length< float3 > | ( | float3 | , |
| float & | ) |
References normalize_and_get_length().
| template float4 normalize_and_get_length< float4 > | ( | float4 | , |
| float & | ) |
References normalize_and_get_length().
| VecT orthogonal | ( | VecT | v | ) |
Calculates a perpendicular vector to v.
Definition at line 195 of file gpu_shader_math_vector.bsl.hh.
References orthogonal().
Referenced by axes_to_rotation(), eevee::fast_gi::eval(), orthogonal(), orthogonal< float2 >(), orthogonal< float3 >(), orthogonal< int2 >(), blender::eevee::IrradianceBake::raylists_build(), and eevee::raytracing::denoise::spatial_main().
| template float2 orthogonal< float2 > | ( | float2 | ) |
References orthogonal().
| float3 orthogonal< float3 > | ( | float3 | v | ) |
Calculates a perpendicular vector to v.
Definition at line 207 of file gpu_shader_math_vector.bsl.hh.
References dominant_axis(), and orthogonal().
| template int2 orthogonal< int2 > | ( | int2 | ) |
References orthogonal().