fix toroid shape
This commit is contained in:
@@ -17,7 +17,7 @@ pub type ColorFormat = gfx::format::Srgba8;
|
||||
pub type DepthFormat = gfx::format::DepthStencil;
|
||||
|
||||
const NEAR: f32 = 0.01;
|
||||
const FAR: f32 = 1000.0;
|
||||
const FAR: f32 = 4000.0;
|
||||
|
||||
gfx_constant_struct! {
|
||||
Trans {
|
||||
@@ -80,7 +80,7 @@ impl ViewRoot<gfx_device_gl::Device, ColorFormat, DepthFormat> {
|
||||
let eye_mat = vr.head_to_eye_transform(eye);
|
||||
|
||||
use self::na::ToHomogeneous;
|
||||
let view_mat = na::Similarity3::new(na::Vector3::new(0.0, 128.0 - 16.0, 0.0),
|
||||
let view_mat = na::Similarity3::new(na::Vector3::new(0.0, 1024.0 - 128.0, 0.0),
|
||||
na::Vector3::new(0.0, 0.0, 0.0), 1.0).to_homogeneous();
|
||||
|
||||
let trans = Trans { matrix: *(proj_mat * eye_mat * hmd_mat * view_mat).as_ref() };
|
||||
|
||||
Reference in New Issue
Block a user