LWJGL
June 19, 2013, 08:44:05 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.9.0 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Basic approach to warpy bendy 2d effects.  (Read 2283 times)
Owen Butler
Newbie
*
Posts: 5


« on: April 15, 2008, 22:45:17 »

G'day,

I'm looking to implement a bendy warpy like effect over my 2d top down shooter.  It's meant to represent shockwaves from explosions and such.  It's similar in a fashion to the bendy warpy effect you get when you charge up a shot in Metroid Prime 3, if you know that.

I guess it'll look similar to the shots in this post here:

http://lwjgl.org/forum/index.php/topic,1160.0.html

IE:

http://i15.photobucket.com/albums/a363/Funkapotamus/frame2.jpg

Now, I'm wondering about the best way to go about this.

At a high level, my plan is this:

Code:
// create gl frame buffer object same size as the screen (640x480) and attach a texture to it
...
// render the scene as normal, but to the framebuffer object/texture (render to texture)
...
// enable a fragment shader which will do the warp effect
...
// disable the framebuffer object, render the whole screen as one big quad, with the texture generated above

Is that the right way to go about this?
Logged
Owen Butler
Newbie
*
Posts: 5


« Reply #1 on: April 17, 2008, 01:50:04 »

Well, this basic approach does seem to work.  After a bit of stuffing around, I have some warpy explosions going on.



I need to tune how they grow and reflect the texture around, but the basics are there.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!