From cee8b3a19833e1143d0551e8031aa812f7c5a92b Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 25 Mar 2026 18:59:04 +0100 Subject: feat(engine): pass vertex subsets to shaders --- engine/src/mesh/cube.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'engine/src/mesh') diff --git a/engine/src/mesh/cube.rs b/engine/src/mesh/cube.rs index e91cf0e..fe45a4a 100644 --- a/engine/src/mesh/cube.rs +++ b/engine/src/mesh/cube.rs @@ -1,7 +1,7 @@ +use crate::builder; use crate::data_types::dimens::Dimens3; use crate::math::calc_triangle_surface_normal; use crate::mesh::{Mesh, Vertex}; -use crate::builder; use crate::vector::{Vec2, Vec3}; builder! { @@ -216,14 +216,14 @@ impl FaceVertices { match face_location { FaceLocation::RightUp => { - self.vertices[0].texture_coords = Vec2 { x: 1.0, y: 1.0 }; - self.vertices[1].texture_coords = Vec2 { x: 0.0, y: 1.0 }; - self.vertices[2].texture_coords = Vec2 { x: 1.0, y: 0.0 }; + self.vertices[0].texture_coords = Vec2 { x: 1.0, y: 1.0 }.into(); + self.vertices[1].texture_coords = Vec2 { x: 0.0, y: 1.0 }.into(); + self.vertices[2].texture_coords = Vec2 { x: 1.0, y: 0.0 }.into(); } FaceLocation::LeftDown => { - self.vertices[0].texture_coords = Vec2 { x: 0.0, y: 1.0 }; - self.vertices[1].texture_coords = Vec2 { x: 0.0, y: 0.0 }; - self.vertices[2].texture_coords = Vec2 { x: 1.0, y: 0.0 }; + self.vertices[0].texture_coords = Vec2 { x: 0.0, y: 1.0 }.into(); + self.vertices[1].texture_coords = Vec2 { x: 0.0, y: 0.0 }.into(); + self.vertices[2].texture_coords = Vec2 { x: 1.0, y: 0.0 }.into(); } }; -- cgit v1.2.3-18-g5258