Idea for inverting mask

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
Adamantos
Prole
Posts: 27
Joined: Sun May 16, 2010 10:47 pm

Idea for inverting mask

Post 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 743 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 743 times
User avatar
TechnoCat
Inner party member
Posts: 1612
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: Idea for inverting mask

Post by TechnoCat »

0.8.0 might have something similar: https://bitbucket.org/rude/love/src/7cc ... cpp#cl-194
Post Reply

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot] and 2 guests