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: Reset current material in setRenderTarget(). #22395

Merged
merged 1 commit into from
Aug 23, 2021

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 23, 2021

Related issue: Fixed #22335 (comment)

Description

When the opaque render list is processed in renderTransmissiveObjects(), it's necessary to reset the cached material since texture bindings are potentially overwritten by a render target definition. This only happens when render targets are prepared in WebGLTextures.setupRenderTarget() (which is the first frame in the issues's test case).

Since this is a general problem, the fix is added at the end of setRenderTarget().

@Mugen87 Mugen87 changed the title WebGLRenderer: Reset current material in renderTransmissiveObjects(). WebGLRenderer: Reset current material in setRenderTarget(). Aug 23, 2021
@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 23, 2021

For some reason the webgl_postprocessing_crossfade E2E test keeps failing in recent PRs. The example looks good though 🤔 .

@mrdoob
Copy link
Owner

mrdoob commented Aug 23, 2021

Nice investigative work!

@mrdoob
Copy link
Owner

mrdoob commented Aug 23, 2021

For some reason the webgl_postprocessing_crossfade E2D test keeps failing in recent PRs. The example looks good though 🤔 .

Yeah, I've been trying to figure it out...
I suspect it may be because the transition timing. I'll have another go tomorrow.

@mrdoob mrdoob merged commit d1541fb into mrdoob:dev Aug 23, 2021
@mrdoob
Copy link
Owner

mrdoob commented Aug 23, 2021

Thanks!

@mrdoob mrdoob added this to the r132 milestone Aug 23, 2021
@takahirox
Copy link
Collaborator

Wow I couldn't figure out the root issue although I have spent all this weekend but you seemed to succeed in doing that just for some hours. Great.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 23, 2021

I couldn't done it in that time without your pointers in #22335 (comment). They were really valuable!

@takahirox
Copy link
Collaborator

The beauty of collaboration

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.

3 participants