Hi ---
I've written a .cal shader for use with colorpict that makes use of Nx, Ny and Nz. But now I want to apply it to a mesh, (or object generated with gensurf with the smoothing option on). Instead of receiving the perturbed (interpolated) vertex normals, it just applies to the local surface normal, leading to faceted appearance.
How do I access the interpolated surface normals in a .cal file?
Cheers,
Roland
Hi Roland,
What is your function file being used for? If it's one of the BRDF types, the NxP, NyP, and NzP variables should be assigned the perturbed normal. You can't generally use a perturbed normal in a pattern or texture.
-Greg
ยทยทยท
From: Roland William Fleming <[email protected]>
Date: July 13, 2007 6:31:28 AM PDT
Hi ---
I've written a .cal shader for use with colorpict that makes use of Nx, Ny and Nz. But now I want to apply it to a mesh, (or object generated with gensurf with the smoothing option on). Instead of receiving the perturbed (interpolated) vertex normals, it just applies to the local surface normal, leading to faceted appearance.
How do I access the interpolated surface normals in a .cal file?
Cheers,
Roland