WinQuake (Non-GL) underwater effect in OpenGL?

Started by
3 comments, last by necrophilissimo 18 years, 7 months ago
Everyone remembers that cool underwater effect of original (non-GL) Quake. The one where the screen pixels were "waved" instead of wall/floor polys. How is this screen effect implemented to OpenGL? Tutorials, anyone? I've seen something similar in latest hi-end games, like Doom 3 (heat effect) and FEAR (shockwaves, Matrix bullet FX). What is the name of this trick?
Advertisement
Newer games: Refraction


Older games: sin() functions... :)

I'm using a cheap sin hack for my game, I simple grab the frambuffer, slap it onto a grid and manipulates the vertexes using sin functions...
"Game Maker For Life, probably never professional thou." =)
I think the original quake just modified the texture coordinates using a sin function over time or something similar.

Doom 3 does a similar thing, but as a fullscreen post-processing effect. I'm guessing they render the texture to the screen and then render a screen-aligned mesh of quads with that texture and warp the vertices. Either that, or they render a single screen-aligned quad and do the warping in a fragment shader.

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

The Quake software renderer distorted the framebuffer using some trig functions. It's actually the exact same thing as doing a "post process" effect using a pixel shader, as it's done in screen-space after rendering everything in the scene.
Quote:I'm using a cheap sin hack for my game, I simple grab the frambuffer, slap it onto a grid and manipulates the vertexes using sin functions...


Interesting approach - how did you implement that? I tried to do something similar in the past, using glCopyTexImage2D, but as there are severe restrictions of are size on that one, it didn't work out so well...

This topic is closed to new replies.

Advertisement