Original Post
🔒 Locked
light map
Advertisement
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)>
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)>
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement