New demo of reflections and refractions with fragment shader

Humus

Crazy coder
Veteran
The almighty Humus releases yet another demo :p

It's a demo of a pretty realistic water surface. The waves are created dynamically by generating a texture with some perlin noise. The refraction is done by rendering the scene to a texture and then the wave texture is used to pertube the texture coordinates on a per pixel level in a fragment shader. Similarily for the reflections, except that they are rendered to the texture with y inverted. Finally, I combine the refraction and reflection by interpolating between them depending on the view angle.

Works on Radeon 8500 only at this time.
Get it here:

http://esprit.campus.luth.se/~humus/?page=3D
 
Works on Radeon 8500 only at this time.
My card is gf3 :(
Could someone post some pics? Thanks

edited: Humus if you have time why dont you converge all the tech from different demos in an single demo/engine? Something like the Ark demo but one that people can walk through it and control.
 
Well, my biggest problem is rather the lack of time. I coded this demo on time I really didn't have, or should have spent on more important stuff like school. Also, sometimes it's just hard to combine things into the same demo. For instance that StencilShadows demo, to put that shadows stuff into my GameEngine would have meant I'd have to rewrite a lot of stuff.


Anyway, here's pic:

refraction2large.jpg
 
Something is odd about the floor, or the floor/walls. It is difficult to see where the boundaries are. I get the feeling that you let the underside of the watersurface reflect light towards the camera. Or something like that. Or it may simply be that the parameters do not match life accurately enough. We have a lot of experience with water, after all. Difficult to judge, this late.

Entropy
 
1st off, looks great!!!
2nd, can you add some waves to the water? Just would likes to see water move up and down against the walls instead of it being straight.. I guess a water jet effect with some points sprites might be cool too :) heck, put a naked chick in there for good luck lol
 
nooneyouknow said:
..I guess a water jet effect with some points sprites might be cool too :) heck, put a naked chick in there for good luck lol
Nah chickens don't float. What you want is a duck.
 
Urmh... on what ATI 8500 driver does this demo work, I just tried the latest official one from ATI and it fails saying 2 extensions are missing. Help ?!
 
ditto on the 9x 9021's a GL_ARB one and an SGI one are missing (I think). I'm at work so cant remember for sure.
 
Kristof,

What OS are you using? I have been reading that Win 9x might have some issues with some of ATI's extensions on the Radeon 8500. If you are using Win 2K or XP, the latest Radeon 8500 drivers should work AFAIK.
 
Win98, how can they have extensions that work in Win2K/XP but not in 98... odd, very odd... strange even... and there aren't even any ducks involved in this.... YET ;)
 
Its the same with a lot of humus's demos. For some reason not all the extensions are supported in the 9x drivers. :-?
 
nooneyouknow said:
1st off, looks great!!!
2nd, can you add some waves to the water? Just would likes to see water move up and down against the walls instead of it being straight.. I guess a water jet effect with some points sprites might be cool too :) heck, put a naked chick in there for good luck lol

That would be possible. I do already tesselate the water into many smaller quads already to get better interpolation, so moving them a little in each vertex wouldn't be too hard.
 
And yes, the Win9x driver doesn't yet support the WGL_ARB_render_texture and GL_SGIS_generate_mipmap extensions. There are some "issues" with it (I have no insight in what those issues are), and since it still isn't supported I would almost say that it probably wont or can't be solved. I suppose I could workaround it though, for instance turning mipmapping off on the rendered textures, and use glCopyTexImage2d() as a fallback when the WGL_ARB_render_texture extension isn't available.
 
Excellent news Humus, the new leaked 9026 win 9x/Me drivers enable your refraction demo to work. So that area has been fixed.
 
Yeah, I just read on Rage3D that it works in Win9x with the 9026 driver. Guess I was all wrong then when I predicted that it probably wont be solved at all. :)

It's very great news!
 
BTW that was persoanl experience, I tried it out of curiousity with the new drivers and found it working.

Now if only Ground Control would work with 1 monitor :(
 
Back
Top