-
Notifications
You must be signed in to change notification settings - Fork 140
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
Performance slowdown using w/ shaders (shine library)? #10
Comments
Hello ianfitzpatrick, thanks for opening an issue. This is a known problem (#1) and unfortunately I can't find a way around it. Push has a setShader function, I recommend you take the shaders code from shine and apply them directly with push. Shine creates additional canvases under the hood, so the push+shine combination makes it only more graphics intensive. I'll try to do something, but in the meantime you should consider working around that problem. |
Okay thanks for getting back to me, I should have looked in closed issues! I'll try and manually apply the shaders instead through push like you mention, thanks. |
Also worth mentioning, next update will have a canvas API that will allow you to create as many canvases as you want to apply different shaders. |
@ianfitzpatrick , I've added the canvas and shader API. You might want to check out the new examples. |
@Ulydev Thanks a ton, I got shaders working with the new code examples in the readme! Just for the benefit of anyone who stumbled on this thread later, in the case of the Shine shaders they are sort of embedded inside of Lua code, so you can't just include them as they are not normal shader files. You have to extract the shader portion to a separate file. |
Ah sorry one more question, is there a simple way to apply multiple shaders to one canvas? In Shine there was a chaining system, but push:setShader is not cumulative right, it's just "this is the active shader?" From what I read in love forums I think I need to setup some kind of multi-pass logic in my draw loop. But just want to make sure I'm not missing a simpler way from within push. Thanks again. |
I use 3+ canvases on switching to the fullscreen mode I lose all my shaders (they stop working. I apply them, but I see no results). Your conversation might give me more clues. |
@ianfitzpatrick , you're right. push doesn't have a multi-pass system yet, but it should be fairly easy to implement. For now, it only supports drawing each canvas with 1 custom shader, then apply another shader to the final, combined render. @D0NM , please open another issue so we can keep them organized (and give me some .love so I can help you further, the demo works fine even in fullscreen mode). |
@Ulydev Cool, thanks much. |
Hi, thanks so much for making this, it works flawlessly UNLESS I turn on shaders :(
I am using the Shine Library to apply a few post processing effects. When I enable these effects, I have intermittent issues with my framerate dropping way way down.
Sometimes it just sort of stutters, but other times everything starts slowing down. If I turn off the shader effects, everything is fine. If I turn the shader effects on, but turn off Push, everything is fine. It's only when both are enabled that I experience these slowdowns.
I'm attaching an example Love file where this behavior happens, maybe you can make some sense of this behavior, or it's a known thing with shaders? To re-create sometimes I have to quit/reload the game several times to trigger the issue, though often it manifests on first load.
FYI you can kick by hitting the space bar, sometimes it seems like actually doing something in game also triggers the slowdown.
OurTeam.love.zip
The text was updated successfully, but these errors were encountered: