Newer
Older
Import / research / 3d-z-maps / viewer / ideas.txt


For models:

    ARGB buffers ->     A - z-value, RGB - color

For lights:

    ARGB buffers ->     A - z-value, RGB - lights index


Idea for lights:


    Render whole world at very low resolution, rendering just the volume of the lights in to
    the 6 cube faces, same as done for models.

    The light volumes might overlap, in which case a new value is made which indexes a LUT which
    contains a list of lights. eg:

    have 5 lights in scene. Start rendering and hit light 1 and store 1, at another point hit
    both light 1 and light 2, store a value of 6 and add to LUT an entry that contains a list
    with light 1 and 2 in it. At another point light 4 and 5's volumes overlap and store value
    of 8 and add LUT entry with light 4 and 5 in it.

    Obviously there are some limitations, can't have more than 2^24 combinations of light overlaps,
    but would need 1000s of lights and with huge amounts of overlapping for that to occur, which does
    not seem like a realistic case. Perhaps need to set limits on number of omni lights and limits on
    the falloff of the directional light. Perhaps up to 8 omni lights (really only need 1 or 2), and
    then 1000s of spot lights with limits on how many other lights they can overlap.