Page 3 of 5

Re: Shädows (A light engine)

Posted: Wed Jan 17, 2018 5:34 pm
by Starkkz
I see, the issue has to be around here.
https://github.com/matiasah/shadows/blo ... s.lua#L104

Though I'm not completely sure what could be causing it. Maybe the distance between the farthest pixel to the center of the light, is lower than the radius value that the shader is using. So when doing the division: Distance / Radius it never reaches 1.0

Edit:

Either way, the distance is quite big and it goes beyond 1.0, when doing the 1.0 - Distance / Radius subtraction it treats the negative output as a positive number (I don't think this could be the case because it makes no sense that a negative number is treated as a positive).

Edit 2:

How does it look if you comment this line?
https://github.com/matiasah/shadows/blo ... t.lua#L255

Re: Shädows (A light engine)

Posted: Fri Jan 19, 2018 2:59 am
by KyleFlores1014
Screenshot_20180119-105553.png
Screenshot_20180119-105553.png (435.7 KiB) Viewed 9025 times
Its becomes much more visible and brighter.

Re: Shädows (A light engine)

Posted: Fri Jan 19, 2018 3:23 am
by Starkkz
Yeah, but this time we've realized that it's indeed the light shader the one that is not working, it isn't doing the fade effect at all. I'm going to have to check this out on GLES soon.

Edit:

My guess is that in
https://github.com/matiasah/shadows/blo ... s.lua#L102

Distance is always way lower than Radius, I don't know why this happens.

Re: Shädows (A light engine)

Posted: Tue Jan 23, 2018 7:51 pm
by Starkkz
I solved your issue and commited it to the git, it was a compatibility issue which I posted here.
https://bitbucket.org/rude/love/issues/ ... difference

Re: Shädows (A light engine)

Posted: Tue Jan 30, 2018 1:40 pm
by KyleFlores1014
Its still there but not that visible though.
Screenshot_20180130-213741.png
Screenshot_20180130-213741.png (455.81 KiB) Viewed 8873 times

Re: Shädows (A light engine)

Posted: Wed Nov 14, 2018 2:21 pm
by DeNick
Hello everyone. Does anyone have the same problem? FPS drops when a moving object (body is updated in love.update). I want the shadow to be cast from dynamic objects (NPC, boxes, etc.).
https://www.youtube.com/watch?v=HcuPDtpkEUU
P.s corrected link

Re: Shädows (A light engine)

Posted: Fri Nov 16, 2018 1:09 am
by MissDanish
DeNick wrote: Wed Nov 14, 2018 2:21 pm Hello everyone. Does anyone have the same problem? FPS drops when a moving object (body is updated in love.update). I want the shadow to be cast from dynamic objects (NPC, boxes, etc.).
https://www.youtube.com/watch?v=HcuPDtpkEU
https://github.com/matiasah/shadows/issues/29

Re: Shädows (A light engine)

Posted: Fri Nov 16, 2018 3:19 pm
by DeNick
MissDanish wrote: Fri Nov 16, 2018 1:09 am
DeNick wrote: Wed Nov 14, 2018 2:21 pm Hello everyone. Does anyone have the same problem? FPS drops when a moving object (body is updated in love.update). I want the shadow to be cast from dynamic objects (NPC, boxes, etc.).
https://www.youtube.com/watch?v=HcuPDtpkEU
https://github.com/matiasah/shadows/issues/29
It's not quite what I need. Updated the link to the video.
https://www.youtube.com/watch?v=HcuPDtpkEUU

Re: Shädows (A light engine)

Posted: Fri Nov 16, 2018 6:08 pm
by zorg
DeNick wrote: Fri Nov 16, 2018 3:19 pm It's not quite what I need. Updated the link to the video.
https://www.youtube.com/watch?v=HcuPDtpkEUU
You are limiting what gets actually rendered, right? and you're not rendering things outside of the visible viewport, right? Because that can eat tons of extra processing that could be avoided.

Re: Shädows (A light engine)

Posted: Sat Nov 17, 2018 3:45 am
by MissDanish
zorg wrote: Fri Nov 16, 2018 6:08 pm
DeNick wrote: Fri Nov 16, 2018 3:19 pm It's not quite what I need. Updated the link to the video.
https://www.youtube.com/watch?v=HcuPDtpkEUU
You are limiting what gets actually rendered, right? and you're not rendering things outside of the visible viewport, right? Because that can eat tons of extra processing that could be avoided.
If you are referring to the actual lights that shouldn't be an issue since I actually helped make sure nothing unnecessary is rendered when the lights are not in range. It even destroys the canvases when it's out of range (the part I helped with).