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

WebGLRenderer: Fix texture unit allocation of morph textures. #22624

Merged
merged 1 commit into from
Oct 4, 2021

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Oct 1, 2021

Related issue: Fixed #22619

Description

This PR ensures that similar to bone textures, morph textures allocated the same texture unit.

@@ -1514,11 +1508,11 @@ function WebGLRenderer( parameters = {} ) {
const environment = material.isMeshStandardMaterial ? scene.environment : null;
const encoding = ( _currentRenderTarget === null ) ? _this.outputEncoding : _currentRenderTarget.texture.encoding;
const envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || environment );
const vertexAlphas = material.vertexColors === true && !! object.geometry && !! object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4;
Copy link
Collaborator Author

@Mugen87 Mugen87 Oct 1, 2021

Choose a reason for hiding this comment

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

I don't think the !! object.geometry statements make sense. Render items always have a geometry, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah wait, we need this for ImmediateRenderObject.

Copy link
Collaborator Author

@Mugen87 Mugen87 Oct 1, 2021

Choose a reason for hiding this comment

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

I wonder if we could remove ImmediateRenderObject 🤔. This would noticeably simplify the renderer. And in that way,WebGPURenderer does not have to support ImmediateRenderObject.

Copy link
Owner

Choose a reason for hiding this comment

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

That sounds good to me 👍

@Mugen87 Mugen87 changed the title WebGLRenderer: Fix texture unit allocation. WebGLRenderer: Fix texture unit allocation of morph textures. Oct 1, 2021
@Mugen87
Copy link
Collaborator Author

Mugen87 commented Oct 1, 2021

I guess we need r133.1 with this fix.

@mrdoob mrdoob added this to the r133 milestone Oct 4, 2021
@mrdoob mrdoob merged commit 92fadd3 into mrdoob:dev Oct 4, 2021
@mrdoob
Copy link
Owner

mrdoob commented Oct 4, 2021

Thanks!

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.

Rendering issues with shadow-casting, morphed meshes.
2 participants