mirror of
https://github.com/sotrh/learn-wgpu.git
synced 2024-11-04 06:00:47 +00:00
docs
This commit is contained in:
parent
ecf8076b75
commit
1bb374c89e
@ -22,7 +22,7 @@ struct Camera {
|
||||
impl Camera {
|
||||
fn build_view_projection_matrix(&self) -> cgmath::Matrix4<f32> {
|
||||
// 1.
|
||||
let view = cgmath::Matrix4::look_at(self.eye, self.target, self.up);
|
||||
let view = cgmath::Matrix4::look_at_rh(self.eye, self.target, self.up);
|
||||
// 2.
|
||||
let proj = cgmath::perspective(cgmath::Deg(self.fovy), self.aspect, self.znear, self.zfar);
|
||||
|
||||
|
@ -50,7 +50,7 @@ impl Camera {
|
||||
}
|
||||
|
||||
pub fn calc_matrix(&self) -> Matrix4<f32> {
|
||||
Matrix4::look_at_dir(
|
||||
Matrix4::look_to_rh(
|
||||
self.position,
|
||||
Vector3::new(
|
||||
self.yaw.0.cos(),
|
||||
|
Loading…
Reference in New Issue
Block a user