Home > other >  Pixel Shader 3.0: why always TEXCOORD incoming 0, 0
Pixel Shader 3.0: why always TEXCOORD incoming 0, 0

Time:09-22

I use DX9 development game, a 2 d pixels with Sprite - & gt; The Draw texturing, if cooperate ps2.0, Draw a picture is normal, but if change to 3.0, painted a piece of pure color, after try a variety of experiments, the accurate conclusion: incoming texture coordinates always (0.0 f to 0.0 f), the following is a code
 
Sampler2D s2D;

Float4 Common (float2 Coord: TEXCOORD, float4 Color: Color) : Color
{
Return tex2D (s2D, Coord) * Color;
}

The above code, when choosing compiler for ps2.0 Coord is normal, but if the compiled into 3.0, Coord always is zero, a great god knows what reason be?

CodePudding user response:

There is no set the texture coordinates in creating model,

CodePudding user response:

DX9 above win10 all debugging