This a Relief Mapping shader with binary search as seen on the Policarpo/Oliveira 2005 paper. I cant guarantee that it's accurate but seems ok so far.
It creates a virtual displacement effect within a surface shader, by appropriately distorting uv coordinates.
Not sure how much mileage you can get from this... it's more of a curiosity, the main limitations are:
- No silhouettes, it's like looking through a window.
- No self shadowing (yet)
- Shadows from other objects aren't distorted
- The displacement only affects things that take uv's as input.
- Doesn't work so good with Micropoly renderer specially if using the height output in a bumpmap shader as opposed to a normal map (normal map shader included)
As such it's probably best to think of it as a sort of super bump mapping and keep the displacement quite low (saya third or less than I used in the renders)... which in turn means you can use much less samples.
cheers
S
PS. sorry, got things mixed with the previous upload... it didnt include the normal map shader.