Skip to content

Conversation

@markschlosseratbentley
Copy link
Contributor

@markschlosseratbentley markschlosseratbentley commented Dec 10, 2025

Description

This PR adds support for the BENTLEY_materials_point_style glTF vendor extension. The specification PR (now merged) can be found here and the specification itself currently lives here.

This PR allows CesiumJS to process and apply the above extension when loading glTF files. This means point primitives will be able to have a diameter property specified and respected in CesiumJS when loaded via glTF.

To test these changes locally:

  • Clone this branch.
  • Build CesiumJS and Sandcastle.
  • Run the dev server locally.
  • Connect to the dev server using your local browser, clicking on Sandcastle.
  • Navigate to the Styled glTF Points example.

Here is a screenshot of test file points-r5-g8-b14-y10.gltf being rendered in CesiumJS

thumbnail

This change further enables CAD-style workflows in CesiumJS.

Issue number and link

Fixes #12891

Testing plan

This has been tested by:

  • Adding a Cesium Sandcastle sample.
  • Adding a unit test.

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

This PR implements support for the proposed BENTLEY_materials_point_style glTF extension, enabling point primitives in glTF files to specify and respect a diameter property in CesiumJS.

Key changes:

  • Added glTF loader support to parse and validate the BENTLEY_materials_point_style extension
  • Implemented shader modifications to render points with specified diameters as circles
  • Created a Sandcastle example demonstrating the new functionality

Reviewed changes

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

Show a summary per file
File Description
packages/sandcastle/gallery/styled-gltf-points/sandcastle.yaml Metadata for new Sandcastle example
packages/sandcastle/gallery/styled-gltf-points/main.js Sandcastle example loading styled point glTF model
packages/sandcastle/gallery/styled-gltf-points/index.html HTML wrapper for the Sandcastle example
packages/engine/Specs/Scene/GltfLoaderSpec.js Unit tests for extension loading and validation
packages/engine/Source/Shaders/Model/ModelVS.glsl Vertex shader support for point diameter
packages/engine/Source/Shaders/Model/ModelFS.glsl Fragment shader to render points as circles
packages/engine/Source/Scene/ModelComponents.js Added pointDiameter property to Material component
packages/engine/Source/Scene/Model/MaterialPipelineStage.js Pipeline stage to configure point diameter uniform
packages/engine/Source/Scene/GltfLoader.js Extension parsing and validation logic
Specs/Data/Models/glTF-2.0/StyledPoints/points-r5-g8-b14-y10.gltf Test glTF file with styled points
CHANGES.md Changelog entry for the new feature
Apps/SampleData/models/StyledPoints/points-r5-g8-b14-y10.gltf Sample glTF file for Sandcastle example

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

Copy link
Contributor

@lilleyse lilleyse left a comment

Choose a reason for hiding this comment

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

Looks good. I left some comments in CesiumGS/glTF#91, but those may or may not affect this PR.

@ggetz
Copy link
Contributor

ggetz commented Jan 9, 2026

@jjhembd Could you take a review pass on the code here, and merge once happy?

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.

Create reference implementation for proposed glTF extension BENTLEY_materials_point_style

6 participants