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

Fix RoughnessMipmapper #22985

Merged
merged 7 commits into from
Dec 9, 2021
Merged

Fix RoughnessMipmapper #22985

merged 7 commits into from
Dec 9, 2021

Conversation

elalish
Copy link
Contributor

@elalish elalish commented Dec 9, 2021

Some of the recent changes in three.js have broken the RoughnessMipmapper: I was getting errors like this in Firefox where the GL errors are a bit more verbose than Chrome:

WebGL warning: generateMipmap: Tex image TEXTURE_2D level 0 is incurring lazy initialization.
WebGL warning: drawElementsInstanced: TEXTURE_2D at unit 1 is incomplete: Bad mipmap dimension or format.

I've got it all working now in MV using this change. It changes the behavior of FramebufferTexture a bit, so that it allocates during uploadTexture and then only fills in data during copyFramebufferToTexture, instead of doing the allocation there. This is important because I call this function in a loop to fill each mip level, and I think the reallocations were the problem.

Anyway, @Mugen87 @mrdoob please give this some scrutiny, since I'm not sure what else this might affect.

@Mugen87 Mugen87 added this to the r136 milestone Dec 9, 2021
@mrdoob mrdoob merged commit d80a715 into mrdoob:dev Dec 9, 2021
@mrdoob
Copy link
Owner

mrdoob commented Dec 9, 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