Page 1 of 1

Idea for inverting mask

Posted: Sun Feb 12, 2012 2:06 pm
by Adamantos
Hey there,

I'm currently working on a game with a lighting engine, which calculates the
field of view from the player's perspective. (see first figure)
It works by drawing a shadow map in a framebuffer, which is mulitplyed with
the underlying floor tiles.
Vector based 2d shadow casting
Vector based 2d shadow casting
droidLightNew.png (80.36 KiB) Viewed 744 times
Now I want to draw all invisble tiles as "blueprints", so you can see the structure
of the level all the time (see second figure).

Any idea how to realize that ? Is there a methode for fast inverting the shadow map?
Example of "blueprint-mode"
Example of "blueprint-mode"
monaco.jpg (11.77 KiB) Viewed 744 times

Re: Idea for inverting mask

Posted: Sun Feb 12, 2012 6:21 pm
by TechnoCat
0.8.0 might have something similar: https://bitbucket.org/rude/love/src/7cc ... cpp#cl-194