Thread: Couple screenshots [GLSL water]

  1. #1
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071

    Couple screenshots [GLSL water]

    I haven't posted any screens in quite a while (or done much with graphics in a while, either). So here's a couple of a water shader I've been working on to get myself back into GLSL.

    It's pretty basic atm. No lighting, other than specular. Fresnel distortion, and a depth map to calculate alpha value.

    Any questions regarding code, feel free to ask.

    http://www.daniel-cook.net/images/water1.jpg

    http://www.daniel-cook.net/images/water2.jpg
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Very nice indeed!

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Absolutely, very nice.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    I could drink it, but I won't. Where's the barrracuda!?
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  5. #5
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    Thanks! I'll have some shots of the under-water shader soonish...as soon as I manage to get it to look like you're under-water.
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  6. #6
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Eh. Just bring the fog in, make it dense, and the right color and you have an under-water render.

    If you really want to get crazy you can use a shader to distort the screen based on sine and cosine waves to simulate water moving across the lens.

  7. #7
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    Quote Originally Posted by Bubba
    If you really want to get crazy you can use a shader to distort the screen based on sine and cosine waves to simulate water moving across the lens.
    That's the only part I've got that I'm happy with .

    I tried using "fog" from the depth map, as it was convenient since it was being used for the water already anyway. But it doesn't look quite right for some reason. Perhaps it's just the colour I picked or something though. Or I might just need to use "real" fog. I'll play with it later.
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Studying for Final, Couple Questions...
    By stewade in forum C Programming
    Replies: 4
    Last Post: 05-10-2004, 05:02 PM
  2. Pokemon talk and a couple useless stories
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 02-01-2003, 03:49 PM
  3. Screenshots of Upcoming "Mists of Avalon"
    By harry_p in forum C++ Programming
    Replies: 62
    Last Post: 08-02-2002, 11:37 AM