Small Improvements to Avatar Dissolve #9023
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Removed some code that was more specific to a general dissolve effect. Not necessary for Avatars since they should always have textures and uvs. Furthermore, I realized threejs is already gonna be passing in the map uniform. We don't want to enable it through USE_MAP though as it breaks some shader outputs. But if we just define the uniform ourselves then we aren't duplicating any data and we're being slightly more efficient.
Explanation
🤖 Generated by Copilot at c2312c5
uv
attribute or thecolor
uniform. (link, link, link, link, link, link)map
uniform directly as the original texture of the object before the dissolve effect, instead of assigning it to another uniform calledorigin_texture
. (link, link)vUv3
varying as the texture coordinates for sampling themap
uniform and thedissolve_texture
uniform, instead of checking for theuv
attribute in the object geometry. (link, link)fragmentColorShader
variable. (link, link)uv
attribute, which was stored in thevertexNonUVShader
variable. (link)color
andorigin_texture
from the common shader code for the dissolve effect, which was stored in thefragmentHeaderShader
variable. (link)🤖 Generated by Copilot at c2312c5