diff options
Diffstat (limited to 'client/src/meshops.rs')
-rw-r--r-- | client/src/meshops.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/client/src/meshops.rs b/client/src/meshops.rs index 38c6c7b..afa50ce 100644 --- a/client/src/meshops.rs +++ b/client/src/meshops.rs @@ -1,4 +1,4 @@ -use glam::{Vec2, Vec3}; +use glam::{Vec2, Vec3, vec2}; pub fn generate_normals(index: &[[u32; 3]], position: &[Vec3]) -> Vec<Vec3> { let mut normal_denom = vec![0; position.len()]; @@ -58,6 +58,8 @@ pub fn generate_tangents(index: &[[u32; 3]], position: &[Vec3], texcoord: &[Vec2 pub fn generate_texcoords(index: &[[u32; 3]], position: &[Vec3]) -> Vec<Vec2> { let _ = (index, position); - // TODO implement equirectangular projection - todo!() + // TODO implement equirectangular projection or something + (0..position.len()) + .map(|i| vec2(i as f32 * 0.01, 0.)) + .collect() } |