summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-28 18:21:33 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-28 18:21:33 -0800
commit941026459ddfdbc7dd8a7324b706ad404751592e (patch)
tree5b6ca099b13d4ea5de410409325fb3b821005fff
parentb7aa0ce2446dfa586f4727d537cdf02fb643fbe9 (diff)
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
-rw-r--r--indra/newview/pipeline.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 060e8545ab..891f83e877 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -4255,7 +4255,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)
{
@@ -4571,12 +4571,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
{