Skip to content

Implement raytraced skinned mesh#9

Closed
maidopi-usagi wants to merge 1 commit into
NVIDIA-RTX:nvidia-pt-dlss-devfrom
maidopi-usagi:nv-pt-skinning
Closed

Implement raytraced skinned mesh#9
maidopi-usagi wants to merge 1 commit into
NVIDIA-RTX:nvidia-pt-dlss-devfrom
maidopi-usagi:nv-pt-skinning

Conversation

@maidopi-usagi

Copy link
Copy Markdown

Adds initial ray traced skinned mesh support.
Skinned and blend shape surfaces now get per-instance BLAS data built from their deformed vertex buffers, so animated meshes can be included in the path tracing path. There’s also a BLAS update/refit path wired through RD and Vulkan to avoid full rebuilds when possible.
Motion vectors for skinned hits are calculated from previous-frame vertex data.

skin_pt

@Bonkahe

Bonkahe commented May 4, 2026

Copy link
Copy Markdown

Does seem to work as intended, there's quite a lot of shaders in my current project that don't play well with path tracing, but I decided to test it in there and here is the results.

PTSkinnedMeshRenderer1 PTSkinnedMeshRenderer3 image

There is an issue when pausing the scene tree where motion vectors are not being updated, I'm assuming this was not introduced by this PR but worth a note:

PTSkinnedMeshRenderer2

The gifs don't really do it justice, it looks quite good xD

@maidopi-usagi

maidopi-usagi commented May 4, 2026

Copy link
Copy Markdown
Author

There is an issue when pausing the scene tree where motion vectors are not being updated, I'm assuming this was not introduced by this PR but worth a note:

repushed a fix. now won't write velocity buffer when skinning not triggered last frame.

@lsikkesNV

Copy link
Copy Markdown
Collaborator

Awesome, thanks for the work :) I'll take this one and rework it a little bit so it will also work for custom GLSL shading such as tree sway and whatnot

@lsikkesNV

Copy link
Copy Markdown
Collaborator

I just pushed a change that fixes multi viewport.. it conflicts a little with your changes (seperate per viewport state, because TLASes and such can diverge due to visibility ranges or LOD)

@maidopi-usagi maidopi-usagi force-pushed the nv-pt-skinning branch 3 times, most recently from 4e74fcc to d85df02 Compare May 7, 2026 06:58
@maidopi-usagi

maidopi-usagi commented May 7, 2026

Copy link
Copy Markdown
Author

Awesome, thanks for the work :) I'll take this one and rework it a little bit so it will also work for custom GLSL shading such as tree sway and whatnot

rebased~ shall i change naming from skinning to a wider one, like "deformable" or something else for vertex shaders.

@lsikkesNV

Copy link
Copy Markdown
Collaborator

Yeah I think that makes sense indeed

@maidopi-usagi

Copy link
Copy Markdown
Author

renamed. also introduced RTDeformedGeometrySource for further deforming types.

@johnlogostini

Copy link
Copy Markdown

I don't know what exactly was changed, but when I tried this PR the other day it was working. As of now, no skeletal meshes are rendered with Path-Tracing, and now they are also broken in Rasterization for some reason.

I have done zero debugging on this so far, but thought it was worth mentioning.

Path-Tracing

Screenshot 2026-05-08 211002

Rasterization

Screenshot 2026-05-08 210950

@maidopi-usagi

maidopi-usagi commented May 9, 2026

Copy link
Copy Markdown
Author

I don't know what exactly was changed, but when I tried this PR the other day it was working. As of now, no skeletal meshes are rendered with Path-Tracing, and now they are also broken in Rasterization for some reason.

Thanks for testing! That's a bit weird. Actually there's not any change in skinned mesh storage/rendering path in the latest commit(0ef2c8f) , and my local test project seems fine.

Do you remember the last working commit?

@johnlogostini

Copy link
Copy Markdown

No, I don’t remember the commit, but it was before Bonkahe committed, so 5 days ago.

@maidopi-usagi

Copy link
Copy Markdown
Author

No, I don’t remember the commit, but it was before Bonkahe committed, so 5 days ago.

Well, that should be the first version commit before rebasing, I'll take a look on if I broke anything. (an MRP will be helpful)

BTW have you tried deleting .godot cache files?

@johnlogostini

Copy link
Copy Markdown

I will get you a minimum reproducible example in a few hours, and no, I did not remove my local project changes. I can try doing that.

@lsikkesNV

Copy link
Copy Markdown
Collaborator

Just tested it here locally, I've got it to work (master chief and all)

@lsikkesNV

Copy link
Copy Markdown
Collaborator

It's now integrated @maidopi-usagi - had to change it a little bit to handle the buffer addresses from being barriered correctly (was causing crashes otherwise in games). I'll close this one. Thank you for contributing!

@lsikkesNV lsikkesNV closed this May 20, 2026
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.

4 participants