Page 1 of 1

Directional Shadows

Posted: Fri Jun 17, 2022 10:05 am
by 0x72
Hi there! Long time no see!

I'm struggling with directional lights.

I believe currentDepth (the distance from light used in final render) is correct (or it's `1-x`, not sure), but everything else - not sure.

I feel like it's a minor change missing and I will feel stupid when I find it.

I've prepared minimal example (attachment, rotate withq/e).

Any tips appreciated!
Thanks in advance.
shadows.png
shadows.png (31.29 KiB) Viewed 1766 times
shadows.love
(68.78 KiB) Downloaded 87 times

Re: Directional Shadows

Posted: Sat Jun 18, 2022 2:51 pm
by 0x72
Still on it but one thing that was definitely wrong was sometimes sending matrices with row and sometimes with column MatrixLayout :/

Re: Directional Shadows

Posted: Sat Jun 18, 2022 3:07 pm
by 0x72
Heck, that was it!

Sending the fixed version for anyone interested.
shadows2.love
(68.76 KiB) Downloaded 364 times
shadows_2.png
shadows_2.png (16.1 KiB) Viewed 1682 times