-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Viewer fixes for IBL Shadows (Draft) #16659
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
base: master
Are you sure you want to change the base?
Viewer fixes for IBL Shadows (Draft) #16659
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16659/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/16659/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/16659/merge#BCU1XR#0 |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
1 similar comment
Visualization tests for WebGPU |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
WebGL2 visualization test reporter: |
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.
All good for me
Not sure about the viewer/snapshot changes. let s wait on @ryantrem to approve
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.
Can we split into a shader / IBL only bug fix PR and the viewer specific one ?
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.
I pushed a change to this PR to fix WebGPU snapshot rendering with IBL shadows. The only other thing I think we probably want before exposing IBL shadows in the Viewer is to disallow them when the model is animated (since IBL shadows do not update in real time as the model animates). @alexandremottet do you want to make those changes in this PR?
@@ -1693,7 +1684,7 @@ export class Viewer implements IDisposable { | |||
|
|||
updateMaterial(); | |||
|
|||
pipeline.onShadowTextureReadyObservable.addOnce(updateMaterial); | |||
pipeline.onShadowTextureReadyObservable.add(updateMaterial); |
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.
Is this change needed?
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.
I guess regardless we don't really need to track and remove the observer, since we would do that at exactly the same time as when we dispose the entire pipeline anyway (which clears observers), correct?
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.
No, I don't think this change is needed.
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
Yes. In fact, I already opened a PR for the animation fix on WebGPU. I didn't really intend this PR to also include that... I'm not sure how I managed to do that. |
When using the geometry buffer with animated meshes, we're hitting this compile error about
uniforms.mPreviousBones
not being defined. Turns out there was a slight difference in the WebGPU shader that was preventing compilation when BONETEXTURE was also defined. Now, the behaviour matches WebGL.