summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
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
commitf00e311756bf499cde3d5273d0f2de39b1f21636 (patch)
tree71a65bd17f056be4f5175dabfa26638e18cad5d7 /indra/newview/pipeline.cpp
parent0467d0a62916f045c50c53e12719ca692271326c (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
Diffstat (limited to 'indra/newview/pipeline.cpp')
-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
{