-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Clean up Custom Shader inputs for voxel rendering #12636
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
Conversation
Thank you for the pull request, @jjhembd! ✅ We can confirm we have a CLA on file for you. |
As part of addressing #12599, Here is a basic local Sandcastle rendering the value of the new depth property. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is looking great @jjhembd. I left one comment to make sure we are providing any existing users with the info they need to update.
I also pushed a small update which linked to the custom shader guide from the inline ref doc, just to make sure the dots are connected.
CHANGES.md
Outdated
@@ -4,6 +4,10 @@ | |||
|
|||
### @cesium/engine | |||
|
|||
#### Breaking Changes :mega: | |||
|
|||
- The `FragmentInput` struct for voxel shaders has been updated to be more consistent with the `CustomShader` documentation. Remaining differences in `CustomShader` usage between `VoxelPrimitive` and `Cesium3DTileset` or `Model` are now documented in the Custom Shader Guide. [#12636](https://github.com/CesiumGS/cesium/pull/12636) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we document a list (or if too long, an example or two) of what attributes changed so that users have a place to start when updating?
@ggetz thanks for the feedback! I added info and an example to the CHANGES.md. This should be ready for another look. |
Looks great! Thanks @jjhembd! |
Description
This PR cleans up the
FragmentInput
struct for voxel custom shaders, to be more consistent with other uses ofCustomShader
and the Custom Shader Guide.Key changes include:
fragmentInput.metadataStatistics
sub-struct, instead of appending them to each metadata property in thefragmentInput.metadata
struct. This brings voxel metadata up to date with the changes toModel
metadata in Add shader struct with metadata statistics #10683.fragmentInput.attributes
sub-struct. It currently only containspositionEC
andnormalEC
.fragmentInput.voxel
sub-struct.fragmentInput.voxel.distanceToDepthBuffer
as a first step toward resolving Access both voxels and mesh surfaces from a custom shader #12599VoxelPrimitive
Issue number and link
Resolves #11832.
Testing plan
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change