Skip to content

Fix point-rendering regression where square points become circular#13219

Merged
mzschwartz5 merged 5 commits intomainfrom
markschlosser/fix-gltf-point-size-rounded-for-all
Feb 19, 2026
Merged

Fix point-rendering regression where square points become circular#13219
mzschwartz5 merged 5 commits intomainfrom
markschlosser/fix-gltf-point-size-rounded-for-all

Conversation

@markschlosseratbentley
Copy link
Contributor

@markschlosseratbentley markschlosseratbentley commented Feb 19, 2026

Description

This PR fixes a point-rendering regression which caused points to render as circles rather than squares. Such points now will only render as circles when their width is specified via the BENTLEY_materials_point_style glTF extension (which requires that such points be circular).

Issue number and link

Fixes #13217

Testing plan

  • Added unit tests.
  • Tested manually using local build of Sandcastle.
    • 3d-tiles-point-cloud-shading sample now renders square points.
    • styled-gltf-points-dev still renders circular points, per the glTF extension specification.

Reviewers can verify these changes at these deployed links:

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

@github-actions
Copy link

Thank you for the pull request, @markschlosseratbentley!

✅ We can confirm we have a CLA on file for you.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a rendering regression in the model/point pipeline so that POINTS primitives render as squares by default again, and only render as circles when explicitly required by the BENTLEY_materials_point_style glTF extension (via pointDiameter).

Changes:

  • Restrict circular point fragment discard logic to PRIMITIVE_TYPE_POINTS && HAS_POINT_DIAMETER in ModelFS.glsl.
  • Ensure HAS_POINT_DIAMETER is defined in both vertex and fragment shader stages when material.pointDiameter is present.
  • Add unit tests covering the presence/absence of pointDiameter behavior and uniform wiring.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/engine/Specs/Scene/Model/MaterialPipelineStageSpec.js Adds test coverage and a pixelRatio mock to validate HAS_POINT_DIAMETER + u_pointDiameter behavior.
packages/engine/Source/Shaders/Model/ModelFS.glsl Makes circular point rendering conditional on HAS_POINT_DIAMETER to restore square-by-default points.
packages/engine/Source/Scene/Model/MaterialPipelineStage.js Emits HAS_POINT_DIAMETER to both shader stages so fragment shader can gate circle discard logic.
CHANGES.md Documents the regression fix and the extension-specific behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mzschwartz5 mzschwartz5 self-requested a review February 19, 2026 18:04
Copy link
Contributor

@mzschwartz5 mzschwartz5 left a comment

Choose a reason for hiding this comment

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

Everything here looks good to me - no comments!

@mzschwartz5 mzschwartz5 added this pull request to the merge queue Feb 19, 2026
Merged via the queue into main with commit 54c2c24 Feb 19, 2026
12 of 13 checks passed
@mzschwartz5 mzschwartz5 deleted the markschlosser/fix-gltf-point-size-rounded-for-all branch February 19, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Point shape was changed from squares to circles

3 participants