Open MatthewsSam opened 10 years ago
It will actually be required to use a separate cubemap for reflexion since using the skybox is only an approximation of the real specular term. Currently I only compute the diffuse component at loading time since it's in O(n) (where n is number of texels) and use a cheap approximation for the specular term but computing the right specular term is in O(log2(n) * n^2) which may be costly if n is 1024 x 1024. I'd like to move all IBL related calculus to python script (since they are far easier to maintain) that would be run at export time so having a way to import a second cubemap for IBL would be nice.
To be precise IBL requires 9 scalars per color for diffuse component (ie 27 coefficients) and sevel mip levels of cubemap depending on how much error we accept on glossyness. I would rather go for 8 mipmap level. So this means 6 x 8 = 48 textures for IBL.
Adding Auria to assignee
Postponed after discussion with vlj.
Currently with gloss/spec map, the reflexion is the skybox. This create a sense of realism but in the reality the reflexion (there is no perfect reflexion) so it's always darker than the reality. Even a perfect mirror will be always a bit darker compared to the real image.
So there is different ways to do that, We can set another cube map for the reflexion but this take work.
I rather suggest of putting an artificial darkness to the sky when it's used for the reflexion. It will be easier IMHO.