highfidelity/hifi — pull request #3873 by samcake (2014-11-27 19:15:11+00:00)
Title: Fix lighmaps for VC demo 12/1/2014

This a quick fix to get the lightmaps rendering correctly in both demo scenes, the "Apartment" and "Tuscany"

- added more fields read from the FBX material to get a better picture
- pass the lightmap in the emissiveMap of the MeshPart
- during rendering the part uses one of the shaders labeled "lightmap" that put the emissive value fetched in the specular color (No specular on light maps for now!). we put a special value in the normal.a component of the normal renderbuffer (0.5) to indicate for the deferred pass that it's an emissive fragment.
in the first deferred pass (directional), if the fragment normal.a == 0.5 then it goes in a specific branch that put out diffuse color * emissive color.
- The format of the lightmap for apartment and tuscany are apparently different, i added an artificial emissive param to add a variable scaling to the emissive, the value is 1.0 for tuscany and 4.0 for apartment, that's what works...

- this is VERY hacky because it's all specific to 2 models, i didn't cover all the cases and it kills the specular but this should work for next week demo...