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

Examples: Clean up. #21904

Merged
merged 2 commits into from
May 29, 2021
Merged

Examples: Clean up. #21904

merged 2 commits into from
May 29, 2021

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented May 27, 2021

Related issue: #21825

Description

Minor linter fixes.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented May 27, 2021

@zalo The example logs in the browser console this warning:

[.WebGL-0x7f9887061a00]GL ERROR :GL_INVALID_OPERATION : glDrawElements: Source and destination textures of the draw are the same.

Do you mind having a look?

@Mugen87 Mugen87 added this to the r130 milestone May 27, 2021
Copy link
Contributor

@zalo zalo left a comment

Choose a reason for hiding this comment

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

Apologies for the delay; it looks like this is caused by the portal rendering itself to its own render texture.

The fix is simple at line 198:

renderer.render( scene, portalCamera );

should be something similar to:

thisPortalMesh.visible = false; // hide this portal from its own rendering
renderer.render( scene, portalCamera );
thisPortalMesh.visible = true; // re-enable this portal's visibility for general rendering

@Mugen87
Copy link
Collaborator Author

Mugen87 commented May 28, 2021

Yep, that fixed the issue! Thx.

Copy link
Contributor

@zalo zalo left a comment

Choose a reason for hiding this comment

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

😁 👍

@Mugen87 Mugen87 merged commit 89f0b93 into mrdoob:dev May 29, 2021
@mrdoob
Copy link
Owner

mrdoob commented Jun 2, 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.

3 participants