Ripple
eharetea

A ripple displacement shader using the RenderMan shading languange using a sin wave!

Create a ripple with a sin() function...

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Thursday July 31st, 2008 10:27 PM


/*
* Author: Dan Lynch
*/

displacement
d_rip
    (
    float Km 0.1numwaves 80.30.25;
    )
{ 
    float sdist a;
    float tdist b;
    float dist sqrt(sdist sdist tdist tdist);
    float hump sin(dist  PI numwaves); 
    normal    n normalize(N);
    
     hump Km;
    calculatenormal(P);
}



Downloads:
Download: ripple.sl 347 B

Please login or Click Here to register for downloads
Creative Commons License
Ripple by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com