• Create Account

### #Actualalkisbkn

Posted 10 August 2012 - 06:30 PM

Okay, it seems that the correct derivative of "wave1" equation is the following:
float3 tan1 = float3(1.0, 30.0 * fs * cos(fs * waveVertex.x + t), 0.0);
float3 bitan1 = float3(0.0, 30.0 * fs * cos(fs * waveVertex.x + t), 1.0);

for tan and bitan. Then I do
normal = normalize(cross(bitan1, tan1));

For 1 wave it seems to be correct, however how should I go about adding many wave's normals together? Just summing them and normalizing the result?

### #1alkisbkn

Posted 10 August 2012 - 06:23 PM

Okay, it seems that the correct derivative of "wave1" equation is the following:
float3 tan1 = float3(1.0, 30.0 * fs * cos(fs * waveVertex.x + t), 0.0);
float3 bitan1 = float3(0.0, 30.0 * fs * cos(fs * waveVertex.x + t), 1.0);

for tan and bitan. Then I do
normal = normalize(cross(bitan1, tan1));

For 1 wave it seems to be correct, however how should I go about adding many wave's normals together? Just summing them and normalizing the result?

PARTNERS