Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ShowRecieveStats in the Developer > Avatar menu #1247

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Armored-Dragon
Copy link
Member

@Armored-Dragon Armored-Dragon commented Nov 22, 2024

This is an attempt at fixing, or at least making this feature operational, ShowRecieveStats setting.
This renders a users display name along with their networking statistics.

While functional this pull creates a hell of a lot of compiler warnings. While not blocking this is annoying. Until I can quiet down its pleaful cries, this won't be ready to merge.

image

* Adjustments
* Don't show local stats.
@Armored-Dragon Armored-Dragon added bug Something isn't working work in progress Do not merge yet needs CR This pull request needs to be code reviewed needs QA This pull request needs to be tested labels Nov 22, 2024
@Armored-Dragon Armored-Dragon self-assigned this Nov 22, 2024
@Armored-Dragon Armored-Dragon removed the work in progress Do not merge yet label Nov 24, 2024
@Armored-Dragon
Copy link
Member Author

It seems as if the compiler issues I had noticed are nothing new.

@@ -1044,7 +1043,7 @@ void Avatar::renderDisplayName(gpu::Batch& batch, const ViewFrustum& view, const
batch.setModelTransform(textTransform);
{
PROFILE_RANGE_BATCH(batch, __FUNCTION__":renderText");
displayNameRenderer->draw(batch, { nameUTF8.data(), textColor, { text_x, -text_y }, glm::vec2(-1.0f), forward });
displayNameRenderer->draw(batch, { nameUTF8.data(), textColor, { text_x, -text_y }, glm::vec2(10.0f), TextAlignment::CENTER, forward });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 10.0f here? the -1.0f bound is supposed to mean "don't clip this to bounds". if that's broken, maybe we should fix it?

it's possible I broke it when I added GPU bound clipping. specifically, this bit in sdf_text3D.slh probably needs to skip this check if params.bounds is negative:

    // Clip to edges. Note: We don't need to check the top edge.
    if (positionMS.x < params.bounds.x || positionMS.x > (params.bounds.x + params.bounds.z) ||
        positionMS.y < params.bounds.y - params.bounds.w) {
        return vec4(0.0);
    }

like:

    // Clip to edges. Note: We don't need to check the top edge.
    if ((params.bounds.x > 0.0 && (positionMS.x < params.bounds.x || positionMS.x > (params.bounds.x + params.bounds.z))) ||
        (params.bounds.y > 0.0 && (positionMS.y < params.bounds.y - params.bounds.w))) {
        return vec4(0.0);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs CR This pull request needs to be code reviewed needs QA This pull request needs to be tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants