Talk:COLORMAP

From DoomWiki.org

Revision as of 21:48, 4 October 2007 by 71.58.109.233 (talk)

This page is factually inaccurate: a brightness value of 7 does use the lowest brightness level, but colormap entry 0 is the brightest. I can't think of an easy way of expressing this right now so I'll leave it as a TODO. -- Jdowland 12:43, 26 Mar 2005 (EST)

I have taken a stab at it. radius 16:09, 29 Mar 2005 (EST)
cheers :) Looks good. I've been doing a lot of digging in the COLORMAPs over easter and I may be able to add a lot more info here (info which has been overlooked in the UDS etc.) Jdowland 02:18, 30 Mar 2005 (EST)
This is all very wrong. There is no constant colormap used for a sector of a particular light level, as light levels fade with distance from the viewer. Even a brightness 0 sector uses reasonably bright colormaps at point blank range. Is paragraph 3 supposed to be talking about the infinite distance colormap? 71.58.109.233 18:50, 4 October 2007 (UTC)
Got a few concrete references. In linuxdoom-1.10 source, r_plane.c . Lines 428-437 in R_DrawPlanes(), executed once per visplane, set up the lighting lookup table based on the sector light level and the z distance from the plane to the viewing location. Lines 161-171 in R_MapPlane(), executed once per span, compute the final colormap given to drawspan based on the lookup table from R_DrawPlanes() and the distance in the (x,y) plane between viewer and the span to draw. Most of the wall lighting is in r_segs.c, where things get more complicated because walls get lighted differently based on their compass direction (I still can't believe it took me 5 years to notice that...). I'm removing the incorrect information. 71.58.109.233 02:48, 5 October 2007 (UTC)