Skip to main content
GameDev.net gamedev.net
🔒 Locked

Interpolation types in HLSL

Started by Sneftel Apr 25, 2008 at 5:39 PM 3 replies 9k views
Original Post
Sneftel
Sneftel
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.
Sc4Freak
Sc4Freak
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.
Sneftel
Sneftel
Removing the underscore doesn't seem to fix things; the error is the same.
DieterVW
DieterVW
Interpolation modifiers only work in DX10. Can you give us the fxc compile line you use to build this shader?
Sneftel
Sneftel
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.