playcanvas/engine — pull request #113 by guycalledfrank (2014-12-11 20:40:54+00:00)
Title: Particle fixes new

Particle fixes.

Fixed alignToMotion;
Added check for more than 65k verts in particle system;
Fixed gamma correction on particles in some conditions;
Fixed particle shader caching key generation;
Fixed runtime CPU-GPU particle switch;
Fixed sorting of mesh particles;
wrapBounds are now relative to emitter pos instead of camera pos;
mode parameter now uses enum, not string;
Fixed mobile particle problems;
Depth softening control is now a bit more intuitive;
Added _activeCamera to scene object (actually last rendered camera);
Fixed depth softening bugs;
Removed camera property from particle system.

Migration:
- particles don't have camera property now;
- mode property now should contain enum value: either pc.scene.PARTICLES_MODE_GPU or pc.scene.PARTICLES_MODE_CPU, not string;
- depthSoftening property is now remapped to look more perceptually linear, when you tweak it from 0 to 1. To make older projects look the same, apply this formula to old softening values to get new ones:
Math.sqrt((1.0 / softening) * 0.01)