not-a-real
not-a-real

Reputation: 13

"nointerpolation" hlsl specifier on dx9 and ps3_0

Problem: different results of indentical shaders on dx9 and dx11. after pix-debugging it, i found that it interpolates values. flat shade mode fixes that but can't be used.

nointerpolation float flStart : COLOR1;
nointerpolation float flEnd : COLOR2;

Reason: seems like ps3_0 just ignore the nointerpolation specifier when ps4_0 and higher doesn't

Question: is it bug of dx9 or ps3_0? is there any other possible ways to not interpolate them through vs?

Upvotes: 0

Views: 408

Answers (1)

rdb
rdb

Reputation: 1617

Shader Model 3.0 did not support interpolation qualifiers. In Shader Model 4.0, the interpolation mode is specified as an additional qualifier in the dcl_input instruction, whereas the dcl_texcoord and dcl_color instructions part of Shader Model 3.0 do not take such a qualifier.

It is probably a mistake that the compiler is not issuing a diagnostic for this.

Upvotes: 0

Related Questions