Merge pull request #3157 from wdings23/master

2 local lights as default
This commit is contained in:
Andrzej Kapolka 2014-07-11 11:24:48 -07:00
commit 222869bf53

View file

@ -60,9 +60,9 @@ Avatar::Avatar() :
_mouseRayDirection(0.0f, 0.0f, 0.0f), _mouseRayDirection(0.0f, 0.0f, 0.0f),
_moving(false), _moving(false),
_collisionGroups(0), _collisionGroups(0),
_numLocalLights(2),
_initialized(false), _initialized(false),
_shouldRenderBillboard(true), _shouldRenderBillboard(true)
_numLocalLights(1)
{ {
// we may have been created in the network thread, but we live in the main thread // we may have been created in the network thread, but we live in the main thread
moveToThread(Application::getInstance()->thread()); moveToThread(Application::getInstance()->thread());
@ -89,14 +89,14 @@ void Avatar::init() {
_localLightDirections[i] = glm::vec3(0.0f, 0.0f, 0.0f); _localLightDirections[i] = glm::vec3(0.0f, 0.0f, 0.0f);
} }
glm::vec3 darkGrayColor(0.3f, 0.3f, 0.3f); glm::vec3 darkGrayColor(0.4f, 0.4f, 0.4f);
glm::vec3 greenColor(0.0f, 1.0f, 0.0f); glm::vec3 greenColor(0.0f, 1.0f, 0.0f);
glm::vec3 directionX(1.0f, 0.0f, 0.0f); glm::vec3 directionX(1.0f, 0.0f, 0.0f);
glm::vec3 directionY(0.0f, 1.0f, 0.0f); glm::vec3 directionY(0.0f, 1.0f, 0.0f);
// initialize local lights // initialize local lights
_localLightColors[0] = darkGrayColor; _localLightColors[0] = darkGrayColor;
_localLightColors[1] = greenColor; _localLightColors[1] = darkGrayColor;
_localLightDirections[0] = directionX; _localLightDirections[0] = directionX;
_localLightDirections[1] = directionY; _localLightDirections[1] = directionY;