mirror of https://github.com/sm64pc/sm64pc.git
Reimplemented LOD
This commit is contained in:
parent
f56db9b48b
commit
f354acac3d
|
@ -267,8 +267,10 @@ static void geo_process_perspective(struct GraphNodePerspective *node) {
|
|||
* range of this node.
|
||||
*/
|
||||
static void geo_process_level_of_detail(struct GraphNodeLevelOfDetail *node) {
|
||||
// We assume modern hardware is powerful enough to draw the most detailed variant
|
||||
s16 distanceFromCam = 0;
|
||||
// The fixed point Mtx type is defined as 16 longs, but it's actually 16
|
||||
// shorts for the integer parts followed by 16 shorts for the fraction parts
|
||||
Mtx *mtx = gMatStackFixed[gMatStackIndex];
|
||||
s16 distanceFromCam = (s32) -mtx->m[3][2]; // z-component of the translation column
|
||||
|
||||
if (node->minDistance <= distanceFromCam && distanceFromCam < node->maxDistance) {
|
||||
if (node->node.children != 0) {
|
||||
|
|
Loading…
Reference in New Issue