Blur and threshold in the main loop to simulate fluids

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
kbups
Prole
Posts: 3
Joined: Mon Feb 20, 2012 2:21 pm

Blur and threshold in the main loop to simulate fluids

Post by kbups »

Hello,

Do you know how to implement the example below with Love2D?

http://www.patrickmatte.com/stuff/physicsLiquid/

I know how the physics engine works but I do not know:
- How to do the blur and then the threshold?
- Which are the better functions to use (for performance)?


Thanks in advance for your reply.
User avatar
Ellohir
Party member
Posts: 235
Joined: Sat Oct 22, 2011 11:12 pm

Re: Blur and threshold in the main loop to simulate fluids

Post by Ellohir »

I guess you'd have to print the scene to a FrameBuffer and then apply the filters. But I think you would have to implement those filters yourself, I think there aren't any integrated in Löve.
User avatar
richapple
Citizen
Posts: 65
Joined: Sun Dec 25, 2011 10:25 am

Re: Blur and threshold in the main loop to simulate fluids

Post by richapple »

I think you are trying to do something that is achieveable with shaders (PixelEffects in LÖVE)
They are added in 0.8.0

You should practise with pixeleffects first and see some great examples in this thread

And because pixeleffect is similar (basically the same) to GLSL there is very handy site with online glsl coding
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest