Skip to content

EveChildCloud scales both screen-space axes using backbuffer width #38

Description

@cppctamber

Status:
Confirmed from source

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
EveChildCloud.cpp:403-405:

unsigned w, h;
Tr2Renderer::GetBackBufferDimensions( w, h );

float x = ( box.m_max.x - box.m_min.x ) * w;
float y = ( box.m_max.y - box.m_min.y ) * w;
float size = std::max( x, y ) / m_preTesselationLevel;

Description
Both the horizontal and vertical extents are multiplied by the backbuffer width. The height is fetched but never used.

The vertical contribution is therefore converted to pixels using width rather than height. This misweights it by the viewport aspect ratio and can make the selected tessellation level aspect-ratio-dependent.

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