Skip to main content
gamedev.net
🔒 Locked

Lightmap

Started by Keba Mar 2, 2004 at 2:04 PM 3 replies 450+ views
Original Post
Keba
Keba
I have a D3D Application which generates lightmaps, but i got a problem. when to lights(point) comes close and the radius is intersected i just add the values togheter, but i then get some strange artifacts.Maybe there is a better way of doing this? ofcourse i''m checking if the result gets over 1.0 then i''m setting it to 1.0. if i have a green light combined with a pink light i get a different result from combining a pink light with a green light.
NaliXL
NaliXL
I think to get the right color, you shouldn''t add, you should take the average.
Newbie programmers think programming is hard.Amature programmers think programming is easy.Professional programmers know programming is hard.
leblebi
leblebi
You should add. But dont forget to clamp to 255(or 1.0f) in the end.
Keba
Keba
What do you mean with Clamp?
Dark_Nebula
Dark_Nebula
It means that if the result of your adds exceeds 1.0, you should set the result to 1.0.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.