Projective Interpolation in Cg

I’ve already googled for hours and was searching in the Panda3D forum, but after all, i’m still not sure how TEXCOORDS are interpolated between the vertex shader and the fragment shader.
OpenGL has a noproject (not nonproject) keyword (that unfortunately is not supported on every compiler) and it looks like Cg should support something like TEXCOORDS.NOPROJECT. My questions (currently there is a big ball of strings in my head):

  • Is every component of a float2, float3, float4 interpolated perspectively correct while they are passed from the vertex shader to the fragment shader?
  • Is this only true for TEXCOORDS.
  • Does only the z coordinate in the depth buffer influence this calculation?
  • Is it possible that only the tex2D has influence to this correction.
  • If yes, then what is the difference to tex2Dproj?

I never cared about this until i started to write this shader tutorials.

Thanks in advance for any insight (and any bit that points my to any direction).

Yes the interpolation between inputs is done in the fixed function interpolates state. So it just collects the input of the 3 vertexes and interpolates them between all the pixel calls.

Some times it does not work though and you have to use extra words like TEXCOORD1-TEXCOORDS12 to “mark” them for interpolation. Uniform also has a play in it check the Cg manual for more info.

Sure there is an interpolation, but I talk about a perspectively correct interpolations. Sorry if I this was unclear (hmm happens to often in my posts I think).