Double-Sided Bumped Refraction

Downloads

Both downloads are Visual Basic.NET 2005 projects.

Refraction.rar [408Kb] – Simpler first version
Refraction_v2.rar [665Kb] – Second version, now with backface rendering (double-sided refraction) and more test models

Description

A specular-capable, normal-mapped, double-sided refraction shader that can be applied to pretty much any TVMesh, originally asked by forum user WEst.

Features

  • Uses a single rendersurface for the environment projection, as opposed to a cubemap (which would be slower to render)
  • The second version uses a second rendersurface to get backface bumped normals, and renders the refraction of rays going out of the model for added realism
  • The second version also has a customizable refraction “power” (not actual refraction indices/ratios)
  • Supports pseudo chromatic dispersion, like the Bullet Trails sample. (three lookups, one for each colour, each one slightly more refractive than the other)
  • Supports specular hightlighting, which is also normal-mapped
  • The glass can be colored too :)

Screenshots

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.