playcanvas/engine — pull request #119 by guycalledfrank (2014-12-12 22:01:53+00:00)
Title: Cubemap texture lod

Single mipmapped prefiltered cubemap instead of 6 cubemaps by using EXT_shader_texture_lod. Only enabled when extension exists AND device has less than 16 samplers (mobiles).

gfx.device can now upload textures with multiple mips.

Single cubemap PROS:
- single texture instead of 6;
- less texture memory;
- faster shader;
- probably a bit more correctly represents glossiness.

Single cubemap CONS (at the moment):
- increased aliasing due to texture minification.

Because of the last thing I currently don't use it on more 'high-end' devices like PC, which still uses 6 textures. This is not the final solution, though. Carrying around 6 maps is not great. I'll try to remedy aliasing problems, but for now these are our best options.
![texlod](https://cloud.githubusercontent.com/assets/7008423/5420181/98e0cee6-8263-11e4-8db5-8c120dbb858e.jpg)
![61](https://cloud.githubusercontent.com/assets/7008423/5420184/9d7a733a-8263-11e4-9060-f3de44203fc4.jpg)