Skip to main content
gamedev.net
🔒 Locked

light map

Started by bingo Sep 29, 2000 at 4:19 AM 1 replies 550+ views
Original Post
bingo
bingo
Hi! How to use D3D to render the scence with the light map, just like Diablo II.
aDasTRa
aDasTRa
well bingo, you must excuse me but i have had a couple heinken and felt compelled to answer you...without further ado then...

the simpliest (ie 8 bit) way imo of using a light map is to make said map a gray scale image of some kind, thus having some kind of value (black say being zero, white 255). now, all you have to do is add this value to each of the r, g, and b values of each pixel to add the light...for example, say you have some pixel that has an rgb value of (100, 50, 75), and a light map with an "intensity" (or gray scale value) of 50...then, simply by adding this value to the pixel''s color value, you would get a brighter pixel with an rgb of (150, 100, 125)...

This method works best in simple palletised modes...and honestly (partly because i use ogl) i have no clue how you would do it in dx, higher color depths, or non-palletised modes...

but anyways, take from that what you will; hope it helps

<(o)>
<(o)>
a2k
a2k
yeah, i woulda said something, but i''m using ogl too. maybe it''s time to convert.

a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k

Topic Locked

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

Sign in to reply to this topic.