2D Raycast lighting/shadow shader

edited June 2017 in GLSL / Shaders


I made a pixel based 2D raycast lighting/shadow shader. It detects pixels with full red as walls, and can run over 500fps with 6 lights on my gtx 1070.

I have been playing with learning shaders and hacked away at the conway and blur examples and skimming the book of shaders to get to here. It works well, but it could clearly be better. It needs more natural mixing of the light, and probably could run faster. Could any shader/lighting gurus steer me in the right direction?

I widdled the code down to almost nothing and got it as clean as I could, it should be easy to dive into.

There doesn't seem to be any other examples of doing this in processing and I feel many people would find it useful, so I'd like to get it much more proper.


Sign In or Register to comment.