Announcement

Collapse
No announcement yet.

Procedural Ripple Tex

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Procedural Ripple Tex

    Code:
    uniform sampler2D dist;
    uniform float offset;
    uniform float waves;
    
    void main() {
    vec3 textureSample = vec3(texture2D(dist, vec2(gl_TexCoord[0])));
    vec3 textureSampleB = textureSample + offset;
    gl_FragColor = vec4(((sin(textureSampleB*waves)+1.0)/2.0)*pow(textureSample.x,2.2), 1.0);
    }
    Usage:

    1) Bump: Vray Color2Bump -> VrayGLSLTex (Above Code) -> Vray Distance Tex

    2) Animate the "Phase" and set how many ripples you want.

    Attached Files
    Gavin Greenwalt
    im.thatoneguy[at]gmail.com || Gavin[at]SFStudios.com
    Straightface Studios

  • #2
    Cool!
    Does that work in RT GPU also?
    Kind Regards,
    Morne

    Comment


    • #3
      looks really cool!
      Thanks for sharing =D
      -------------------------------------------------------------
      Simply, I love to put pixels together! Sounds easy right : ))
      Sketchbook-1 /Sketchbook-2 / Behance / Facebook

      Comment

      Working...
      X