Shädows (A light engine)

Showcase your libraries, tools and other projects that help your fellow love users.
Starkkz
Prole
Posts: 24
Joined: Thu Jul 16, 2015 7:24 pm

Re: Shädows (A light engine)

Post 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
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Shädows (A light engine)

Post by KyleFlores1014 »

Screenshot_20180119-105553.png
Screenshot_20180119-105553.png (435.7 KiB) Viewed 9638 times
Its becomes much more visible and brighter.
Starkkz
Prole
Posts: 24
Joined: Thu Jul 16, 2015 7:24 pm

Re: Shädows (A light engine)

Post 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.
Starkkz
Prole
Posts: 24
Joined: Thu Jul 16, 2015 7:24 pm

Re: Shädows (A light engine)

Post 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
KyleFlores1014
Citizen
Posts: 73
Joined: Thu May 25, 2017 1:43 pm

Re: Shädows (A light engine)

Post by KyleFlores1014 »

Its still there but not that visible though.
Screenshot_20180130-213741.png
Screenshot_20180130-213741.png (455.81 KiB) Viewed 9486 times
User avatar
DeNick
Prole
Posts: 4
Joined: Wed Aug 01, 2018 5:23 pm
Location: Russia

Re: Shädows (A light engine)

Post 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
Last edited by DeNick on Fri Nov 16, 2018 3:07 pm, edited 1 time in total.
MissDanish
Citizen
Posts: 65
Joined: Wed Mar 07, 2018 11:21 pm

Re: Shädows (A light engine)

Post 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
User avatar
DeNick
Prole
Posts: 4
Joined: Wed Aug 01, 2018 5:23 pm
Location: Russia

Re: Shädows (A light engine)

Post 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
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Shädows (A light engine)

Post 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.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
MissDanish
Citizen
Posts: 65
Joined: Wed Mar 07, 2018 11:21 pm

Re: Shädows (A light engine)

Post 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).
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 4 guests