Skip to content
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

secondlife/viewer#2349: Avatar/animesh rendering correctness pass #2364

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

cosmic-linden
Copy link
Contributor

No description provided.

@cosmic-linden cosmic-linden marked this pull request as draft August 21, 2024 16:15
@cosmic-linden cosmic-linden changed the title secondlife/viewer#2349: Blinn-Phong avatar/animesh rendering optimization/correctness pass secondlife/viewer#2349: Avatar/animesh rendering optimization/correctness pass Aug 21, 2024
@cosmic-linden cosmic-linden changed the title secondlife/viewer#2349: Avatar/animesh rendering optimization/correctness pass secondlife/viewer#2349: Avatar/animesh rendering correctness pass Aug 21, 2024
@@ -688,6 +671,81 @@ bool LLRenderPass::uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinI
return true;
}

// Returns true if rendering should proceed
//static
bool LLRenderPass::uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinInfo, const LLVOAvatar*& lastAvatar, U64& lastMeshId, bool& skipLastSkin)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inspection of LLDrawPoolMaterials indicated that there are several important things to check when drawing a rigged mesh:

  • Is the avatar null? If so, don't render.
    • Note: Some cases of null avatar are more suspicious than others. Some may be bugs. I previously added llassert(avatar) here for a bit to catch some bugs, but I'm not convinced all cases of null avatar are bugs.
  • Is the matrix palette not defined? If so, don't render.
  • During alpha draw passes, shaders are interleaved, so don't assume the skinning is up-to-date if the shader changes

count,
false,
(GLfloat*)&(mpc.mGLMp[0]));
continue;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now a continue, but was previously a return. The return appeared to not be correct, as it would interfere with the rendering of other objects in the draw pool.

@cosmic-linden cosmic-linden linked an issue Aug 21, 2024 that may be closed by this pull request
@RunitaiLinden RunitaiLinden merged commit 2c4fe4f into develop Aug 22, 2024
13 checks passed
@RunitaiLinden RunitaiLinden deleted the v-2349 branch August 22, 2024 18:45
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avatar/animesh rendering correctness pass
2 participants