|
|
> Light mapping is a common efficient method for lighting static
scenes, especially in older 3D games. I had always assumed that light
maps could both make the underlying texture darker *and* brighter (from
complete black to completely overexposed white where the lighting is the
strongest, and then of course an unmodified texture in between the two
extremes).
If you write your own shader, you can simply take the light map texture,
multiply it by the texture, and multiply the result by 2 or whatever
constant you want, thus essentially scaling the brightness to any range.
(You'll start to run into precision issues with high values if you're
not using HDR textures, of course.)
You seem to know of a way to render two textures at once, multiplying
them together. I wasn't aware of that feature, so I'm not sure if I'm
just misunderstanding. If you do have a way to do that, you can simply
use vertex colors of rgb(2,2,2), and make sure you have vertex color
clamping turned off (with glClampColorARB I think). Even if you can't
render the light map and the texture at the same time, this trick might
still be useful for a different solution.
- Slime
Post a reply to this message
|
|