-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directed light not casting shadow at 90º #27
Comments
The goal of having 2 equation is to avoid the "0 problem" (like divided by zero). The check that I do here by checking the angle seems to not be good :
But by doing what was made before a little bit remixed seams to do the trick :
sorry for the inconvenience, math is hard :) |
Absolutely no problem! |
Confirm that this wasn't present before, but this can fixed by doing :
instead of :
|
Until now more or less I could understand the errors and solutions... but this really got me. I guess this has to do with floating point precision... But someting tells me that is easier to solve the glitch of DirectedLight than the snap. |
Well I think I found something that fix it all 😪 :
If someone have a better/more performant way to do this cause I'm starting to get lost on that :) |
I'm almost sure it has to do with compiler differences, because although I just forked your own branch for 90fix to see if I got any of the glitches shown in the gifs of this thread, none of them happen to me.. Let's keep this change, as it fixes the glitch for these cases. |
Closed in #28 |
With the last fixes, now directed lights don't cast shadows when they have a 90º rotation. I'm not sure whether it has to do with the line intersection calculation, but this surely didn't happen before.
Capture 1
Capture 2
@JonathSpirit just mentioning you in case you want to be aware.
The text was updated successfully, but these errors were encountered: