Demo下载地址:(未整理版)
http://free.gameres.com/用户上传区(Upload)/Chimp.rar

阅读笔记如下。。。
波输入:当前传播位置(原始位置+波速*时间,原始位置即顶点到波源的距离,用顶点坐标dot normal求出)
法线偏移:波函数的偏导(即cos)对应加到分量当中
易混淆:设tangent space的basis在世界坐标系下为T,B,N,则tangent space的某向量t和它在world space下的值w的对应关系为:
t = w * [T,B,N] (在shader里是三个dp3)或
w = t * [T,B,N]的逆也就是[T,B,N]的转置(在shader里是mul mad mad)

反射和折射的效果如图…

reflection only

refraction with only one refractive index

refraction with three refractive indices

reflection + refraction

reflection + refraction + specular