Skip to content

Conversation

@donmccurdy
Copy link
Collaborator

Related issue: #22530

We need to compute program parameters consistently in these locations:

const vertexTangents = !! object.geometry && !! object.geometry.attributes.tangent;

vertexTangents: ( !! material.normalMap && !! object.geometry && !! object.geometry.attributes.tangent ),

That's easy to miss, and if they don't match can cause performance issues similar to the one identified in #22530. It'd be great if we can find a solution to #22530 that avoids having to compute these parameters in two locations. For now this PR just removes one case that may fall into that problem.

@mrdoob mrdoob added this to the r133 milestone Sep 22, 2021
@mrdoob mrdoob merged commit af99874 into mrdoob:dev Sep 22, 2021
@mrdoob
Copy link
Owner

mrdoob commented Sep 22, 2021

Thanks!

@donmccurdy donmccurdy deleted the bug-webglrenderer-vertextangents-invalidation branch September 22, 2021 14:43
@Usnul
Copy link
Contributor

Usnul commented Oct 5, 2021

would it make sense to refactor this out, to avoid divergence in the future? or comment for future devs perhaps?

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