Results 1 to 4 of 4

Thread: Water colour using a cube map

  1. #1
    Senior Member OpenGL Guru knackered's Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    2,833

    Water colour using a cube map

    I refer to the Gamasutra article on Deep Water Rendering: http://www.gamasutra.com/gdce/jensen/jensen_01.htm

    In the section entitled "Color of Water", the author talks about indexing into a cube map to find the colour.
    Has anyone had any thoughts on how to do this with texture shaders? As far as I can see, you can only do the "cube map reflect" calculation with texture shaders, but no "cube map refract", or something similar.
    Maybe someone could share their implementation ideas on this area....
    Knackered

  2. #2
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    Re: Water colour using a cube map

    At that point he was talking about the reflection term only, which should be in world space here. He goes on to weight this vs the refraction using Fresnel's term and it's the color of refraction he also cube maps.

    He clearly says he computes the refracted ray using Snellís Law, that is all you need for the refraction cubemap.

    This is simply a cube map for all possible refraction directions that might come out of the above. It's generated for a homogeneous water material with a flat surface. The refraction vector is then used to access this cube map, with the usual EMBM vector peturbation mentioned later in the article.

  3. #3
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    Re: Water colour using a cube map

    P.S.

    NVIDIA has reflection and refraction EMBM demo on their web site, the refraction mode even has a 3 pass chromatic aberration effect.

  4. #4
    Senior Member OpenGL Guru knackered's Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    2,833

    Re: Water colour using a cube map

    Thanks dorbie, I'll look into that.
    Knackered

Similar Threads

  1. OpenGL colour not able to render colour
    By mundrapiyush in forum OpenGL: Linux
    Replies: 3
    Last Post: 05-16-2010, 03:15 AM
  2. Cube Map without using OpenGL's Cube Mapping
    By someoney in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-10-2010, 01:05 PM
  3. FarCry-like water and cube map problems
    By unreal in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 07-21-2004, 07:16 PM
  4. display a cube inside another bigger cube
    By jyoung77 in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 05-08-2003, 06:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean