From dab40e47bcc6e6ac595ab67809b8ea496ea48b2f Mon Sep 17 00:00:00 2001 From: Miloslav Ciz Date: Thu, 20 Feb 2025 15:57:34 +0100 Subject: [PATCH] Fix culling bug --- TODO.txt | 3 +++ data | 29 ++++++++++++++++++++++++----- map.h | 2 -- racing.h | 2 +- renderer.h | 2 +- 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/TODO.txt b/TODO.txt index 6cb3e21..219cd8c 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,5 +1,8 @@ =========== GENERAL ============== +- culling is very slow now, it showed that distance bailout can accelerate it + a lot, try to make a more accurate bailaout and see if it's faster (watch + out for bugs due to false positives) - improve the car unstucking? maybe we can just keep the position of the car and ONE wheel (other joint positions can be computed) - some kind of special map block that would say where 3D triangles don't have diff --git a/data b/data index a4439a5..6e04051 100644 --- a/data +++ b/data @@ -4,9 +4,28 @@ #Btestmap; #Maaaaa;4321 0 -:*B1vJ :!wct :!wcA -:=n0s :fiba -:xo1t :fgb8 +:*B2vJ -:]o1tI :fg11 :|o2tI :fg11 -:]o1A :fg11 :|o2A :fg11 +box +:=n0s :fida +:=n6s2 :fi1a +:xo2t :fgm8 + +:^ocs2 :fg11 :vncs2L +:^ocB2I :fg11 :vEcs2I +:^nct2J :f118 :vncB2 +:^Ect2L :f118 :vEcB2J + +:xo1w :fg12 + +ramps +:]o2tI :fg11 :|o3tI :fg11 +:'o1uI :fg11 +: - (3 * LCR_RENDERER_UNIT / 2)) + (3 * LCR_RENDERER_UNIT)) return 0; vertices[1] = LCR_renderer.mapVerts + 3 * t1[1];