Interpolation types in HLSL

Started by
3 comments, last by Sneftel 16 years ago
Has anyone gotten interpolation types to actually work? I'm referring to the modifiers documented here. I have this as VS->PS pipe:

struct vertexOutput {
    float4 HPosition      : POSITION;
    float3 UV             : TEXCOORD0;
    float3 LightVec       : TEXCOORD1;
    float3 WorldTangent	  : TEXCOORD2;
    float3 WorldBitangent : TEXCOORD3;
    float3 WorldNormal    : TEXCOORD4;
    float3 WorldView      : TEXCOORD5;
    _noperspective float3 TCstep : TEXCOORD6;
};

..which produces this: error X3039: 'TCstep': structure members cannot be target specific Unsettlingly, this is the same error produced if I specify other modifiers, including invalid ones.
Advertisement
I believe that's a typo in the docs. There shouldn't be an underscore before noperspective (or any of the other interpolation types for that matter).

Oh, and for the nointerpolate type, the docs say that it only works on integer types. As far as I can tell, it works fine on other types. I'm not sure if this is a documentation bug, or if that's actually intended behaviour.
NextWar: The Quest for Earth available now for Windows Phone 7.
Removing the underscore doesn't seem to fix things; the error is the same.
Interpolation modifiers only work in DX10. Can you give us the fxc compile line you use to build this shader?
Quote:Original post by DieterVW
Interpolation modifiers only work in DX10.

That'd be it, then. Hmmmm. Drat. Alright.... I guess I'll have to figure out how to compensate for the perspective correction instead.

This topic is closed to new replies.

Advertisement