From cf3df7968ef654ba7cafeafd463e7107b80ca07f Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 18:21:33 -0800 Subject: woo, dumb GL lights now match up to our dumb shader model pretty well. next: shader model needs to grok point vs directional, shader model needs to resurrect ambient which I seem to have broken --- indra/newview/pipeline.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index bced8a8e07..71f9ce7eb2 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4284,7 +4284,7 @@ void LLPipeline::setupAvatarLights(BOOL for_edit) glLightf (GL_LIGHT1, GL_LINEAR_ATTENUATION, 0.0f); glLightf (GL_LIGHT1, GL_QUADRATIC_ATTENUATION, 0.0f); glLightf (GL_LIGHT1, GL_SPOT_EXPONENT, 0.0f); - glLightf (GL_LIGHT1, GL_SPOT_CUTOFF, 180.0f); + glLightf (GL_LIGHT1, GL_SPOT_CUTOFF, 180.0f); } else if (gAvatarBacklight) // Always true (unless overridden in a devs .ini) { @@ -4600,12 +4600,12 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) { LLVector3 spotparams = light->getSpotLightParams(); LLQuaternion quat = light->getRenderRotation(); - LLVector3 at_axis(0,0,-1); // todo: verify against deferred + LLVector3 at_axis(0,0,-1); // this matches deferred rendering's object light direction at_axis *= quat; llinfos << "SPOT!!!!!!! fov: " << spotparams.mV[0] << " focus: " << spotparams.mV[1] << " dir: " << at_axis << llendl; glLightfv(gllight, GL_SPOT_DIRECTION, at_axis.mV); - glLightf (gllight, GL_SPOT_EXPONENT, 0.0f); // fixme - focus - glLightf (gllight, GL_SPOT_CUTOFF, 22.0f); // fixme - fov + glLightf (gllight, GL_SPOT_EXPONENT, 1.0f); // 1.0 = good old dot product + glLightf (gllight, GL_SPOT_CUTOFF, 90.0f); // hemisphere } else // omnidirectional (point) light { -- cgit v1.2.3