I was wanted to do the same thing a while back. Unfortunately, the answer was pretty much that it can t be done in QC. It could potentially be achieved with a 3rd-party plugin like Kineme 3D, but the Kineme developers seemed to think the way QC is setup internally makes it very difficult to pass arbitrary vertex attributes to GLSL shaders.
Sorry to be the bearer of bad news... a|x On Thu, 18 Mar 2010 22:57 GMT luca palmili wrote: >Hi, >I'm trying to implement cone-step mapping shader in QC, and I got this >problem: the GLSL vertex shader needs to know the tangent of each vertex. As >far as I know, GLSL lets to access to the per-vertex normal value using the >built-in attribute gl_Normal, but the tangent of each vertex needs to be >passed from the OpenGL application (calculated when the mesh is loaded for >example), or stored in the mesh file. >So, i guess the right way to do that is to use per-vertex attribute like >this in vertex shader: > >[...] >attribute vec3 tangent; //The tangent of the current vertex >[...] > >...but how can this attribute be passed to the GLSL shader for each vertex? >I also need per-vertex binormal value, but I guess it would be ok to >calculculate its value once I got per-vertex normal and tangent values in >this way: > >binormal = normalize(cross(normal, tangent)); > >Thank you for any kind of help! _______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

