| ... | @@ -23,3 +23,20 @@ Some changes have already been posted for this for performance improvements (arr |
... | @@ -23,3 +23,20 @@ Some changes have already been posted for this for performance improvements (arr |
|
|
We should use GLEW to figure out what GL version and extensions are currently available.
|
|
We should use GLEW to figure out what GL version and extensions are currently available.
|
|
|
|
|
|
|
|
We should switch to using framebuffers for any frame capture effects (endlevel screen, upscaling).
|
|
We should switch to using framebuffers for any frame capture effects (endlevel screen, upscaling).
|
|
|
|
|
|
|
|
### Sector light function
|
|
|
|
|
|
|
|
>Take sector's light level and divide it by 8. Call this value "lightnum". For walls, add 1 if the wall is straight vertically, and subtract 1 if the wall is straight horizontally. Clip this value to [0, 31].
|
|
|
|
>
|
|
|
|
>Take the "scale" of the graphic (160 / distance from the camera in units should = "scale"), multiply by 4. Call this value "pindex". (I think this is multipled by 2 for flats, but don't quote me on that.) Clip this value to [0, 47].
|
|
|
|
>
|
|
|
|
>((31-lightnum)*2)-(160/((pindex+1)>>9)) clipped to [0, 31] should be the index of the colormap to use, 0 being the fullbright one. If the result is wrong, this is probably where I screwed up.
|
|
|
|
>
|
|
|
|
>Simplify the equation as needed :V
|
|
|
|
|
|
|
|
-- @RedEnchilada
|
|
|
|
|
|
|
|
[Source of algorithm in question](http://git.magicalgirl.moe/STJr/SRB2/blob/d7b3795a82cfeb363b5d1269231ea635f40c9681/src/r_segs.c#L395)
|
|
|
|
|
|
|
|
[Furyhunter's proof-of-concept palette renderer w/colormapping](http://git.idolagames.com/furyhunter/palettedraw/src/master)
|
|
|
|
|