Repository navigation
Conversation
ghost
previously approved these changes
Nov 30, 2021
ghost
left a comment
There was a problem hiding this comment.
Other than the shiny dog issue which also appears on master everything looks fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
So, while looking into #2915, I noticed that our cloning of textures is in fact causing those copies to be independently uploaded to the GPU, which is causing much of the obscene slow-load of that example with ten identical models. I originally put in the cloning so that our
setURImethod on the scene-graph would change textures independently for two identical models. This change obviously regresses that, however I think it's the right call now that we have a better texture creation API and since this increases performance and simplifies the code considerably.Note, this does not actually fix the real problem in #2915, which appears to be caused by very slow shader compilation, which has seen been resolved upstream in three.js.
I have also removed
RoughnessMipmapperhere, as it has become too much of a headache to maintain. It also costs a little startup time and GPU memory for all models loaded in MV, while having a noticeable effect on very few. Instead, if someone has a model that could use this (shiny material with high-frequency normal map), I will instead recommend the use of KTX2 textures (which everyone should probably be using anyway); these require all mip levels to be present in the file in the first place, so you'll simply want to ensure you use a tool that takes appropriate note of the normal map when generating roughness mips. FYI @pushmatrix @mikkoh.