Page 1 of 1

"pixel-accuracy" 2D-shadows

Posted: Mon Aug 17, 2015 9:29 pm
by AntonioModer
LOVE2DCatalinZimaShadows test1.png
LOVE2DCatalinZimaShadows test1.png (85.96 KiB) Viewed 4184 times
Bug on the right at the bottom. Light passes through two diagonal pixels.
Bug on the right at the bottom. Light passes through two diagonal pixels.
LOVE2DCatalinZimaShadows test2.png (145.37 KiB) Viewed 4184 times
This is "pixel-accuracy" 2D-shadows.
Shadows compute fully on the GPU's pixel-shaders.
Need GLSL 1.20 (OpenGL 2.1).
Used GLSL-shaders from: http://bitbucket.org/totorigolo/shadows
Catalin Zima's shadows: http://www.catalinzima.com/2010/07/my-t ... d-shadows/

Thanks to:
* Catalin Zima (http://www.catalinzima.com/about/)
* Thomas Lacroix (http://plus.google.com/b/10724855610396 ... 3962831257)
LOVE2DCatalinZimaShadows standalone.zip
All in one, sources included, version 0.0.10
(3.51 MiB) Downloaded 384 times
Sources: http://github.com/AntonioModer/LOVE2DCatalinZimaShadows

Bugs:
* see image №2. Bug on the right at the bottom. Light passes through two diagonal pixels.

Also, i found this 2d-shadows (pixel-accuracy or ray-traced): ------------------------------------------------------------------------------------------------------------
Story.
I could not write the GLSL-code yourself (my code you find in sources). :(
Then i I found this video: https://www.youtube.com/watch?v=Liv7BcMYelE
And asked source code from author of video.
Thomas Lacroix (author) give me sources: https://bitbucket.org/totorigolo/shadows
I adapt his GLSL-shaders to LOVE2D, and this is worked.
Thank you Thomas Lacroix. :)