-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Fix/gaussian splat flicker #12799
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/gaussian splat flicker #12799
Conversation
Thank you for the pull request, @BlockCnFuture! Welcome to the Cesium community! In order for us to review your PR, please complete the following steps:
Review Pull Request Guidelines to make sure your PR gets accepted quickly. |
I have signed the CLA. |
before.mp4after.mp4 |
Thanks @BlockCnFuture, I can confirm we have a signed CLA for you now. |
It's a very simple change with visible results. That's always a bonus. The extra texture memory overhead isn't a huge deal. I would just say it could be a short lived fix given potential changes happening. But that may not factor into this at all. I'll do some testing, but initially it looks like a good fix. |
@keyboardspecialist Were you able to test this at all? If not, what are the next steps so we can help out? |
Yeah, I tested this and pending the other PR checklist items it's good to go. |
Thanks @keyboardspecialist! @jjhembd Could you review this PR and ultimately merge once happy? |
The blank lines in CHANGES.md are likely caused by markdownlint. |
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.
Thanks @BlockCnFuture! This looks good to me!
Description
I found that during the period between the completion of new material generation and the completion of the new sorting, the drawCommand used the new materials along with the old sorting results, which caused the flickering issue.
I used a simple method to improve the flickering issue of Gaussian Splat by creating a variable that references the address of the old material to ensure it is not affected by the new material, and after the material is generated, I make sure to update _vertexArray (because the length of _indexes staying the same doesn’t necessarily mean no update is needed).
At the same time, I found that
!primitive._gaussianSplatTexture
is always true, and I’m not sure if this is intentional. Therefore, for now, I don’t need to consider the impact caused byprimitive.gaussianSplatTexture.copyFrom
.cesium/packages/engine/Source/Scene/GaussianSplatPrimitive.js
Line 515 in 52f55d0
Issue number and link
Fixes #12662
Testing plan
The flickering issue in Gaussian splatting rendering should be improved.
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change