Increase resolution of PMREM output?

I’m using the PMREMGenerator with an equirectangular texture to create my environment reflections. I’ve noticed that the output is always 768x768, regardless of the size of the input image I provide:

Is there a way to double this resolution? I’m getting some bad pixelization when the curvature of the equirec gets bent to create each side:

Equirectangular before PMREM:

Result after PMREM:

I’d like to increase this resolution to avoid that aliased look when white meets black. Is this possible with PMREMGenerator?

I believe there is a hard coded value somewhere in the PMREM code.

Yeah, I’ve played with the LOD_MAX value, which is what yields 256, but increasing this by 1 breaks the layout, which makes all the roughness calculations in the shader go haywire:

LOD = 8

LOD = 9

@marquizzo I guess it’s best if you clarify this question at GitHub.

1 Like

Hi! Have you had any luck with this? I’m currently trying to increase the resolution of PMREM generated mips for low roughness levels. Looks like the only way for me is to study the algorithm, but I couldn’t find any textual description of it (besides the code itself, of course). If anyone knows where to find any detailed info on the PMREMGenerator algorithm I would appreciate much!

Sorry, I didn’t dig into this much after this post. I just ended up blurring the sharp edge by 1px to get rid of that jagged edge because by then I had already spent too much time on it :slight_smile: