Drag the purple object to move it Q+E to make purple object bigger or smaller Move mouse to move the light/player camera Space to compare to simulation (blue) This can be used as simple shadows (maybe if you blur the shadow costume it could look better) and a fog of war effect. It's main strength is that it performs a lot better than simulating shadows with raycasting. It also looks cleaner because it isn't limited by the pen extension's resolution. The simulated shadow is modified code from @griffpatch Things I want to add in the future: -support for multiple objects (easy) -potentially reducing resolution when not needed if it increases performance (easy) -make it more accurate with small objects (challenging) -support for rectangular objects (challenging) -support for multiple light sources (very challenging)