You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the function refract is missing. The following code is stolen from here. I is the incident vector, N is the normal vector, and eta is the ratio of indices of refraction.
k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I));
if (k < 0.0)
R = floatN(0.0);
else
R = eta * I - (eta * dot(N, I) + sqrt(k)) * N;
Please add it thank you.
The text was updated successfully, but these errors were encountered:
I think the function
refract
is missing. The following code is stolen from here.I
is the incident vector,N
is the normal vector, andeta
is the ratio of indices of refraction.Please add it thank you.
The text was updated successfully, but these errors were encountered: