arksha / OceanSurface

The final project of CSCI 580, simulation an ocean surface based on Jerry Tessendorf ’s algorithm
GNU General Public License v2.0
3 stars 1 forks source link

Not using equation 36 for calculating normals #1

Open lihas opened 4 years ago

lihas commented 4 years ago

In wave.cpp you are simply assigning slopes obtained from equation 20 to Normals array. normalField[index] = normalize(vec3( sign * out_slope_x[index][0], -1, sign * out_slope_z[index][0]));

The values obtained in equation 20, are then to be used in equation 36 to obtain normal. Don't you think your implementation is wrong?

lihas commented 4 years ago

referring tessendorf's paper - http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.161.9102&rep=rep1&type=pdf