Contact Info

Metal Shader

Corrugated
Metal

Wattle and Daub Shader
Tree Trunk Shader
Water Shader Rippling Water
Flame Shader Flickering Flame
Water Shader Step by step tutorial - 1 - 2 - 3 - 4

STEP 4: Putting it all together

A layer of smaller surface waves added as a fractal so the user can specify the number of iterations depending on how much detail they need and how important render time is.

 

float wave_macro = getWave(s, macro_freq, phase, macro_chop, p);
float wave_micro = getWave(s*t, macro_freq, phase, micro_chop, p);
float ripple = getRipple(rippleFreq, rippleKm, p) ;
hump = wave_macro + wave_micro;
float i, f = rippleFreq, amp = rippleKm ;
for(i=0; i < iterations; i = i+1)
{
hump = hump + getRipple(f, amp, p);
f = f*3; amp = amp/5;
}

LIBRARY FUNCTION
float getRipple
(float rippleFreq, rippleKm; point p)
{
return
(noise(p*rippleFreq) - 0.5)* rippleKm;
}

< PREV FINISHED SHADER >