Breaking change in PBR

Hey monkeys lately I’ve been working on the PBR shader and tried to fix graphic and code inconsistencies.
This lead to this commits that are breaking changes:
0da2bfe Changed how roughness is stored into prefiltered env map mipmaps for a more consistent method. - Nehon
e6a55e9 Dropped the use of the irradiance Map for LightProbes, only the spherical harmonics coeffs are stored and used to recompose indirect diffuse color in the shader.

Breaking in the sense that you’ll have to recompute your LightProbes maps. Indeed the probe doesn’t use the irradiance map anymore, but only the spherical harmonics coefficients (that’s 9 vec3 to store versus a 128x128 cube map).
Also the way roughness is stored in the prefiltered env map mip maps has been changed to have more accurate roughness.
I’ve bumped the default env map size to 256 because 128 was really bad for very reflectives surfaces, 256 is ok but depending on your need you might want to bump it to 512 or even 1024.
Finally I’ve added a new way to sample the env map that allows better IBL lighting for high roughness materials.

I have a couple of other changes to do before I can call it done, but they shouldn’t be breaking changes like this one.

A nice picture, because a post without picture is lame.


It breaks my PBR material for tree generator :smiley:

That’s what I meant by breaking change :stuck_out_tongue: