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

Strange code: texture.generateMipmaps enabled for one cube face #26736

Closed
OndrejSpanel opened this issue Sep 12, 2023 · 1 comment · Fixed by #26772
Closed

Strange code: texture.generateMipmaps enabled for one cube face #26736

OndrejSpanel opened this issue Sep 12, 2023 · 1 comment · Fixed by #26772
Labels

Comments

@OndrejSpanel
Copy link
Contributor

Description

Following code looks strange:

renderer.setRenderTarget( renderTarget, 4 );
renderer.render( scene, cameraPZ );
renderTarget.texture.generateMipmaps = generateMipmaps;
renderer.setRenderTarget( renderTarget, 5 );
renderer.render( scene, cameraNZ );
renderer.setRenderTarget( currentRenderTarget );

Why is generateMipmaps reset before rendering last (negative Z) cube face? If this is intentional, I think it should be commented, as the code looks strange.

Reproduction steps

  1. look at the code

Code

none

Live example

none

Screenshots

No response

Version

156

Device

Desktop

Browser

Chrome

OS

Windows

@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 12, 2023

The idea is to generate mipmaps when the render target is complete, meaning when all sides of the cube render target have been rendered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants