Shading time!
Today, I’ve done a massive rewrite of the shader I was using so far. In the progress I’ve added attributes to the wave geometry that adds zones to the wave. The first image shows a visualisation of these zones. The zones are defined by the angle of the surface.
Yesterday night, I had finished an initial attempt at a ‘zone based shader’. The second image shows where I ended (hardly readable but shows complexity). I had a shader setup for each zone and blended the output from these afterwards. I could have predicted that this would perform horribly bad.. and it did. Turns out it obviously has to do the reflect and refract calculations (the most expensive) for all zones for each ray it calculates. For some pixels (those that reflect and refract more than one other surface (up to 3/4) would require up to 4*4*5 refract/reflect calculations!! rendering out a single frame took a looooong time.
This got me a little worried.
Just before the end of my day however, I figured I could just as easily just blend the five sets of all input parameters (one for each zone) and pipe the result back into a single shader path. This is where I ended up now and it renders crazilly fast and its really a lot of fun playing around with different settings for the wave zones. The third image shows the shader as it stands now.
Finally, the last image shows a rather crazy render with each zone having different colors and some other settings. Hardly an effect you’d strive for in a normal situation but it does prove the effectiveness of the rendering of the different zones.



