Stremik Posted July 23, 2002 Share Posted July 23, 2002 What is the purpose of Code tag SQL tag and HTML tag ? They all look very similar to Quote Quote Link to comment Share on other sites More sharing options...
Marc Posted July 27, 2002 Share Posted July 27, 2002 Those tags are there specifically for those seperate things. And they'll keep the syntax of whatever you put in there. For example :: vector anisotropic(vector nn; vector V; float urough, vrough) { vector LL; // Normalized light vector vector H; // Half angle vector vector lclr; // Light color vector tanU, tanV; float rz, cos_r, cos_i; // Reflected and incident angles float nml_term; float uval, vval; nml_term = 4.0 * M_PI * urough*vrough; cos_r = dot(nn, V); lclr = 0; if (cos_r > 0.0) { tanU = normalize(dPds) / urough; tanV = normalize(dPdt) / vrough; // Loop through all lights which contribute specular illuminance (P, nn, M_PI/2, LIGHT_SPECULAR) { LL = normalize(L); cos_i = dot(LL , nn); if (cos_i > 0.0) { H = normalize (V + LL); uval = dot(tanU, H); vval = dot(tanV, H); rz = cos_i*exp(-2.*(uval*uval + vval*vval) / (1.0 + dot(H, nn))); rz /= nml_term * sqrt(cos_i*cos_r); lclr += Cl * rz; } } } else lclr = 0; return lclr; } Make sense?? Quote Link to comment Share on other sites More sharing options...
Stremik Posted July 27, 2002 Author Share Posted July 27, 2002 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.