feat: Added shader loading and swapping as well as beginnings of out of the box noise generation and support for multiple render passes

This commit is contained in:
lisk77 2024-12-17 01:36:34 +01:00
parent 4ada207b3b
commit 2736d97d03
23 changed files with 1479 additions and 692 deletions

View file

@ -30,11 +30,7 @@ impl Camera {
}
pub fn build_view_projection_matrix(&self) -> cgmath::Matrix4<f32> {
// 1.
let proj = cgmath::ortho(self.position.x() - self.dimension.x() / 2.0, self.position.x() + self.dimension.x() / 2.0, self.position.y() - self.dimension.y() / 2.0, self.position.y() + self.dimension.y() / 2.0, 1.0, 0.0);
// 3.
return OPENGL_TO_WGPU_MATRIX * proj;
OPENGL_TO_WGPU_MATRIX * cgmath::ortho(self.position.x() - self.dimension.x() / 2.0, self.position.x() + self.dimension.x() / 2.0, self.position.y() - self.dimension.y() / 2.0, self.position.y() + self.dimension.y() / 2.0, 1.0, 0.0)
}
}