View Full Version : Range limited lighting
06-13-2001, 08:15 AM
DX is able to specify a range for each light. verts beyond this range are not lit by the light, regardless of the attenuation settings used. This is pretty useful in some cases.
Is it possible to do something similar to this using opengl (and without resorting to vertex shaders)?
06-13-2001, 08:21 AM
You can do it using register combiners on GeForce video cards. Check out this site for a good explanation of how to do it:
06-13-2001, 08:23 AM
You may also want to look into the glLight function. It allows you to specify constant, linear, or quadratic attenuation.
06-13-2001, 08:39 AM
I am already using the attenuation (as I mentioned). I was hoping there might be a simple extension that supported this range limited behaviour that I was not aware of.
For example, it would be nice to be able to do something like this...
sglLightf(GL_LIGHT0, GL_EXT_RANGE, 10.0f);
to stop a light effecting any verts that are > 10 units away. All verts less than 10 units away are effected by the normal attenuation rules.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.