HDRCubeTexture and PBRMaterial roughness on iOS

https://playground.babylonjs.com/indexStable.html#WCAFJJ#8

Not sure if this is a known issue, but I was unable to find anything in the documentation or on this forum. I am using a PBRMaterial, adding an HDR reflection texture, and then adjusting the roughness value. On my ipad Air 2 roughness has no effect. Desktop and Android devices that I have tried work fine. The same issue appears if you use textures rather than setting the roughness value.

I am hoping it is something simple that I have overlooked. Thanks for the help.

ping @sebavan

1 Like

This is expected as a .hdr texture is not prefiltered and ios does not support some of the features simulating “wrongly” the prefiltering.

You should have a look at Use a HDR environment (for PBR) - Babylon.js Documentation to check how you could generate your own HDR prefitered environment.

1 Like

Environments! Definitely overlooked that. Thanks for the push in the right direction.

1 Like

I’m having a related problem. The conversion of HDR textures works in the sense, that i get textures that react correctly to roughness on the iPad. However the light intensity is all wrong and it seems to me that i’m loosing dynamic range. Are there some known settings for IBLBaker that produce dds files comparable to the original hdr when used in babylonjs? I’m asking because we already invested a considerable amount of time fine tuning PBR materials including tweaking the intensity and rotation of reflection textures.

fyi: the dds produced by IBLBaker are also rotated differently than the original hdr. This can be corrected by rotating them like this: reflectionTexture.setReflectionTextureMatrix(BABYLON.Matrix.RotationY(Math.PI))

You might need to look into Lys for the best possible quality here.

I also remember there is an intensity setting in ibl baker defaulting to 2 which might be your issue ?