Shädows (A light engine)

Showcase your libraries, tools and other projects that help your fellow love users.
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 » Sat Nov 17, 2018 10:30 am

MissDanish wrote:
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).
The fact is that when I add a motion to an object in love.update, FPS immediately drops to 200-250 (before that it was about 700-800). When adding a new lighting FPS even more begins to fall. The movement of the object I do as follows:

Code: Select all

	local x,y = newBody2:GetPosition()
	newBody2:SetPosition(nx,750)

	if (x >= 700 and move) then 
		 nx = nx + 0.5
		move = true
		if (nx >= 900) then 
			move = false
		end
	end

	if (x <= 900 and not (move)) then 
		nx = nx - 0.5
		move = false
		if (nx <= 700) then 
			move = true
		end
	end

Starkkz
Prole
Posts: 21
Joined: Thu Jul 16, 2015 7:24 pm

Re: Shädows (A light engine)

Post by Starkkz » Sat Nov 17, 2018 2:48 pm

It's very likely that the problem you're facing is the softness shader being applied to every particular light. You can disable that effect by setting the Light.Blur to false.

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 » Sat Nov 17, 2018 3:39 pm

Starkkz wrote:
Sat Nov 17, 2018 2:48 pm
It's very likely that the problem you're facing is the softness shader being applied to every particular light. You can disable that effect by setting the Light.Blur to false.
OMG. I could not find the problem for so long. Thank you very much!

Starkkz
Prole
Posts: 21
Joined: Thu Jul 16, 2015 7:24 pm

Re: Shädows (A light engine)

Post by Starkkz » Sat Nov 17, 2018 6:44 pm

I'm sorry about this missing information, I'm going to add it to the wiki.

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

Re: Shädows (A light engine)

Post by MissDanish » Tue Nov 27, 2018 10:14 am

Would you be willing to add square lights to Shädows?
Provides free hugs :neko:

Post Reply

Who is online

Users browsing this forum: Alexar and 6 guests