playcanvas/engine — pull request #99 by guycalledfrank (2014-11-28 22:14:32+00:00)
Title: More on prefiltered cubemaps + scene skybox + fixes

- Fixed light intensity issues;
- Added skybox as scene property (using component is now not required);
- Added scene-wide prefilteredCubeMap properties;
- Shader now uses scene's prefilteredCubeMap if it's not overridden in material;
- Removed forgotten console.log;
- Added temporary workaround code for loading prefilteredCubeMaps from static address.

How to set up skybox:
scene.skybox = cubemap; // that's all!
scene.skybox = null; // turn off

Scene prefiltered cubemap overrides skybox cubemap with its highest mip.

Try loading Spheres demo with this PR:
http://dev.playcanvas.com/dave/spheres/designer/pack/cff10118-71a5-11e4-a012-22000a4aad67
![pmrem2](https://cloud.githubusercontent.com/assets/7008423/5232565/0e1e3018-7765-11e4-8683-505a0a5ea56a.jpg)

Running it, and then typing in console:
bootstrap.application.context.scene.prefilteredCubeMapPreset = "forest"
bootstrap.application.context.scene.prefilteredCubeMapPreset = "altar"
bootstrap.application.context.scene.prefilteredCubeMapPreset = "beach"
bootstrap.application.context.scene.prefilteredCubeMapPreset = "galileo"
bootstrap.application.context.scene.prefilteredCubeMapPreset = "grace"
bootstrap.application.context.scene.prefilteredCubeMapPreset = "stpeters"
bootstrap.application.context.scene.prefilteredCubeMapPreset = "uffizi"

Isn't it cool?
Consider this merged and have a good weekend!