-
Notifications
You must be signed in to change notification settings - Fork 72
Closed
Description
How are people feeling on replacing all the trivial impl Vector<f32, 4>
with a plain glam::Vec4
?
pro:
- clearer to read
- functions returning
V: Vector
don't need any explicit declarations that it's aVec2
, in case of ambiguity:
rust-gpu/crates/spirv-std/src/float.rs
Line 225 in fb42c2b
pub fn u16x2_to_vec2_unorm<V: Vector<f32, 2>>(int: u32) -> V {
contra:
- Both
Vec3
andVec3A
implVector<f32, 3>
, so you can't use them interchangeably anymore. We expect most people to useVec3
, and conversion is a trivialFrom::from
.
Cases where we are generic on the vector element type, or element count, or both should remain as generic, eg:
pub fn subgroup_broadcast_first<T: VectorOrScalar>(value: T) -> T { |
eddyb and schell
Metadata
Metadata
Assignees
Labels
No labels