Hello,
as you know, this is a simple shader:
struct VS_INPUT
{
float4 Position : POSITION;
float4 Color : COLOR0;
};
struct VS_OUTPUT
{
float4 Position : POSITION;
float4 Color : COLOR0;
};
float4x4 WorldViewProj;
VS_OUTPUT vs_main( in VS_INPUT In )
{
VS_OUTPUT Out;
Out.Position = mul(In.Position,
WorldViewProj);
Out.Color = In.Color;
return Out;
}
This code works fine for untransformed vertices. But now I want to use transformed ones and changed the code to:
struct VS_INPUT
{
float4 Position : POSITION;
float4 Color : COLOR0;
};
struct VS_OUTPUT
{
float4 Position : POSITION;
float4 Color : COLOR0;
};
float4x4 WorldViewProj;
VS_OUTPUT vs_main( in VS_INPUT In )
{
VS_OUTPUT Out;
Out.Position = In.Position; <-- changed this line
Out.Color = In.Color;
return Out;
}
Well, I thought this might work. I use values between -1.0f and 1.0f for x/y of Position, z = 0.5f...but nothing is visible now.
Does somebody has an ideo what's wrong / whar I forgot???
I could imagine that it has to do with the w-component, but I'm not sure about this.