Culling improvements + GRAPH_RENDER_INVISIBLE check change (#590)

* Culling improvements + earlier GRAPH_RENDER_INVISIBLE check

GRAPH_RENDER_INVISIBLE is now checked during geo_process_object before any uncessesary transformation is applied to
the object, translation is still calculated for sound even if the object is invisible.
Half fov is now computed during geo_process_perspective.
Vertical culling has been added (only when bellow the screen to prevent shadow´s being culled).
Emulators have basically infinite culling aspect ratio to prevent early culling with widescreen viewport hacks.
Default culling radius is now a define.
This was written by both me and Kaze Emanuar, he provided the suggestion to use absf and informed me of
integer division being remarkably slow (although it´s only used once during geo_process_perspective).

* Badly placed new line (major fix)

* integer

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>

* parenthesis

doesn´t affect order of operation, just for code quality

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>

* uncessary whitespace

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>

---------

Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
This commit is contained in:
Lilaa3
2023-06-23 16:06:24 +01:00
committed by GitHub
parent 73fad6195d
commit 16e55ad952
5 changed files with 99 additions and 54 deletions

View File

@@ -133,3 +133,20 @@
* NOTE: When this is enabled, The 49th hardcoded rectangle shadow will act as a regular circular shadow, due to Mario's shadow ID being 99 in vanilla.
*/
#define LEGACY_SHADOW_IDS
/**
* Limits the horizontal fov on emulator like on console. May break viewport widescreen hacks.
*/
//#define HORIZONTAL_CULLING_ON_EMULATOR
/**
* Makes objects bellow the screen be culled.
*/
#define VERTICAL_CULLING
/**
* If the first command of an object´s geolayout is not GEO_CULLING_RADIUS, DEFAULT_CULLING_RADIUS
* will be used instead.
*/
#define DEFAULT_CULLING_RADIUS 300