Skip to content

Skinned Mesh Shader Optimizations and C++ changes to support - #6256

Draft
naitro2010 wants to merge 4 commits into
secondlife:developfrom
naitro2010:feature-skinned-mesh-shader-optimizations
Draft

naitro2010 wants to merge 4 commits into
secondlife:developfrom
naitro2010:feature-skinned-mesh-shader-optimizations

Conversation

@naitro2010

Copy link
Copy Markdown

Description

This PR moves some processing that used to run on the GPU for every skinned vertex into a precomputed step on the CPU to hopefully improve frame rates with lots of visible avatars.

Here is the linked issue: #6255


Checklist

Please ensure the following before requesting review:

  • [Y] I have provided a clear title and detailed description for this pull request.
  • [Y] If useful, I have included media such as screenshots and video to show off my changes.
  • [Y] The PR is linked to a relevant issue with sufficient context.
  • [M] I have tested the changes locally and verified they work as intended. (I cherrypicked the changes from a local branch with my other modifications to Alchemy Viewer. They work on Alchemy Viewer with my local build.)
  • [?] All new and existing tests pass.
  • [?] Code follows the project's style guidelines.
  • [?] Documentation has been updated if needed.
  • [Y] Any dependent changes have been merged and published in downstream modules
  • [Y] I have reviewed the contributing guidelines.

Additional Notes

This is my first time creating a pull request for Second Life.
Please let me know if I can do anything to improve the next pull requests I make or if there are any code quality issues that I can fix.
I mostly wrote these changes to improve the frame rate for my new version of the viewer with Stereo 3D Virtual Reality rendering that I've been working on but I think they might help with normal rendering too.
I don't have a large number of different GPUs to test on so I'm leaving this pull request as a draft until more people are able to test it on their hardware.

@github-actions github-actions Bot added the c/cpp label Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@naitro2010

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@akleshchev
akleshchev requested a review from Geenz September 3, 2026 15:31
@naitro2010

Copy link
Copy Markdown
Author

Is there a way to make a release build for this pull request with GitHub actions that I can download and test? I've only tested with a local build so far.

Thanks :)

@akleshchev

akleshchev commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Is there a way to make a release build for this pull request with GitHub actions that I can download and test?

There is a full, downloadable build at the bottom?

@naitro2010

Copy link
Copy Markdown
Author

I just merged the latest changes from develop because the newer LLSD parsing integration test failed to pass.

@naitro2010

Copy link
Copy Markdown
Author

Apparently GitHub is having internal server errors when downloading dependencies now 😢

@akleshchev

akleshchev commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@naitro2010 there is a green checkbox near the commit, click it, it will show a list of 'checks', that's the build, open any OS specifc one and go to summary.

Artifacts are at the bottom of the summary. https://github.com/secondlife/viewer/actions/runs/34837962086

@naitro2010

Copy link
Copy Markdown
Author

@akleshchev Thanks :)

I'll test with the release build on Windows now.

@akleshchev

Copy link
Copy Markdown
Contributor

Note that it's ReleaseOS, not Release, but the difference should be negligible for shaders.

@naitro2010

Copy link
Copy Markdown
Author

I just tested and it seems like avatar and skinned mesh rendering works on Windows without any issues.
I'm not sure how to profile for A/B testing though.
I think I did see a way to record and replay a connection in the Advanced or Developer menu but I'm not sure how to use it or if it will work for profiling the same scene multiple times.

@akleshchev

Copy link
Copy Markdown
Contributor

Basically you moved some repeating math from gpu to make it one-time on cpu?

Sadly shaders are not in my wheelhouse and I have no idea how to test skinning either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants