Fix #2: Optimize ground rendering using triangle strip

This commit is contained in:
2022-10-23 01:52:24 +02:00
parent f028ad7bb7
commit 76d64b6660
3 changed files with 81 additions and 64 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ impl CameraState {
pub fn get_perspective(&self) -> [[f32; 4]; 4] {
let fov: f32 = 3.141592 / 2.0;
let zfar = 53_209.0;
let znear = 0.01;
let znear = 1.0; //0.01;
let f = 1.0 / (fov / 2.0).tan();
@@ -118,7 +118,7 @@ impl CameraState {
s.0 * f.1 - s.1 * f.0,
);
const SPEED: f32 = 1.0; //0.01;
const SPEED: f32 = 100.0; //1.0;
if self.moving_up {
self.position.0 += u.0 * SPEED;