Skip to content

EveSpaceObject2 applies the LOD factor in the opposite direction from child meshes #37

Description

@cppctamber

Status:
Question: Should hulls lod differently from their children?

Source version:
Carbon v5.0.0, commit 342fbe595b572070e09b583a03e215011f5924e9

Notes
I do not have a runnable Carbon build, so this was not reproduced at runtime.

Source
EveSpaceObject2.cpp:1618, applied at :1729:

auto invLodFactor = updateContext.GetLodFactor();                                     // :1618 — not GetInvLodFactor()
m_meshScreenSize = frustum.GetPixelSizeAccrossEst( ... ) * invLodFactor;   // :1729

Description
Despite its name, invLodFactor holds GetLodFactor(). EveChildMesh.cpp:378 takes the reciprocal GetInvLodFactor() and applies it to the equivalent measurement at :417-418, so hull and child scale in opposite directions: 4x apart at a factor of 2.

Both feed the same authored m_maxScreenSize thresholds via GetMeshLod (:1223, EveChildMesh.cpp:511), which is why the difference looks unintended. The variable name is the only real hint, and hulls may simply be meant to lod differently from their children. I do not know whether this is deliberate.

Agrees at the default factor of 1. The factor is g_eveSpaceSceneLODFactor / m_upscalingAmount (EveSpaceScene.cpp:456), so upscaling alone exposes it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions