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 » Wed Jan 17, 2018 5:34 pm

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 » Fri Jan 19, 2018 2:59 am

Screenshot_20180119-105553.png
Screenshot_20180119-105553.png (435.7 KiB) Viewed 2983 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 » Fri Jan 19, 2018 3:23 am

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 » Tue Jan 23, 2018 7:51 pm

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 » Tue Jan 30, 2018 1:40 pm

Its still there but not that visible though.
Screenshot_20180130-213741.png
Screenshot_20180130-213741.png (455.81 KiB) Viewed 2831 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 » 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=HcuPDtpkEUU
P.s corrected link
Last edited by DeNick on Fri Nov 16, 2018 3:07 pm, edited 1 time in total.

User avatar
MissDanish
Citizen
Posts: 64
Joined: Wed Mar 07, 2018 11:21 pm
Location: Denmark

Re: Shädows (A light engine)

Post by MissDanish » 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
Provides free hugs :neko:

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 » Fri Nov 16, 2018 3:19 pm

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: 2580
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Shädows (A light engine)

Post by zorg » 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.
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.

User avatar
MissDanish
Citizen
Posts: 64
Joined: Wed Mar 07, 2018 11:21 pm
Location: Denmark

Re: Shädows (A light engine)

Post by MissDanish » Sat Nov 17, 2018 3:45 am

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).
Provides free hugs :neko:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest