Comments (9)
@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.
I'll keep you updated about it.
@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).
from push.
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.
from push.
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.
from push.
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.
from push.
@ianfitzpatrick , I've added the canvas and shader API. You might want to check out the new examples.
from push.
@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.
from push.
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.
from push.
I use 3+ canvases
and apply different shaders to them.
Then I draw all the canvases on the main canvas (where I use the push lib)
on switching to the fullscreen mode I lose all my shaders (they stop working. I apply them, but I see no results).
I have to investigate the bug (my bug, probable).
Your conversation might give me more clues.
from push.
@Ulydev Cool, thanks much.
from push.
Related Issues (20)
- Pixellation using push with love.js HOT 8
- white screen HOT 3
- Push:finish() Shader Processing After window resize or fullscreen mode HOT 4
- Properly scale love.graphics.circle? HOT 2
- Background color HOT 1
- Love 11.2 Issues HOT 3
- push:toGame return value HOT 1
- memory usage steadily increases when using canvases
- : bad argument #2 to 'windowUpdateMode' (number expected, got nil) HOT 8
- Resizing window also resizes internal cavases
- Error push.lua:48 : bad argument # 2 to 'windowUpdateMode'(number expected, got table) HOT 5
- Error HOT 1
- error at 135 HOT 4
- Error when running love, any help? HOT 2
- toReal function creates global variables HOT 1
- Canvas Transformations not Preserved when Drawn in Update()
- Setting window width/height to 0 in push:setupScreen causes blank screen HOT 2
- Performance is terrible on Android if canvas flag = true
- push:setupScreen makes the program close HOT 5
- Black bars problem and windowed mode broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from push.