Skip to content

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