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
Reflection MirrorTexture is not affected by PBRMaterial's roughness #5146
Comments
As we are trying to work towards a real time solution for prefiltering cube texture from probes or mirror, we fixed some default setup of prefiltreing but it unfortunately impacted the mirror. As a workaround you can set manually the lod generation offsets and scale in your application. I will update the reflection probe to their default previous setup: mirrorTexture.lodGenerationOffset = 0; In order for it to work you also need to generate mipmap of the mirror http://www.babylonjs-playground.com/#06UJB4#1 I am closing the issue for now as real time prefiltered texture is in already in our list of future potential candidates. |
@sebavan i see that blurred reflection is creating in the grid (due to the mipmaps i guess) Is there a way to achieve blurring without those steps. this looks awkward in motion. |
Nope, for PBR to work accurately, the environment needs to be prefiltered in a special way hence the use of Prfiltered Cube Map form external tools. This step being slow... pretty slow a few techniques with lower quality but still rather expensive (GPU wise) exists. These are the one we are plannning to add to our toolset. Relying on MipMaps (hardware generated) without the extra setup is totally not accurate and usually blocky for high roughness. This is why we will give a shot to the other techniques. More info available here: https://learnopengl.com/PBR/IBL/Specular-IBL |
@sebavan The issue is back with 4.1.0, i've lost all roughness in mirrors, having mipmaps, lod scale and everythis set. It was working in 4.0.3 |
Could you provide a playground with the issue ? |
It is because there was a bug with mipmaps generated for bilinear sampling before, the mode now needs to be forced to a filtering mode requiring mipmaps: |
Thanks @sebavan, this seems to work again. |
Reflected ball is affected by material's roughness and become blurres as it's value comes to 1
Reflected ball is constantly sharp no matter what metallic or roughness values the mirror material has
The text was updated successfully, but these errors were encountered: