This has been driving me mad for a while now...
Asuming the vertex data is created and fed correctly, shouldn't this HLSL code show my object in uniform white color?
struct VS_INPUT
{
float3 posL : POSITION;
float3 normalL : NORMAL;
};
struct VS_OUTPUT
{
float4 posH : SV_POSITION;
float3 posW : POSITION;
float3 normalW : NORMAL;
};
//--------------------------------------------------------------------------------------
// Vertex Shader
//--------------------------------------------------------------------------------------
VS_OUTPUT VS(VS_INPUT vsIn)
{
VS_OUTPUT psIn;
float4x4 mWVP = mWorld * mView * mProjection;
psIn.posH = mul(float4(vsIn.posL, 1.0f), mWVP);
psIn.posW = mul(float4(vsIn.posL, 1.0f), mWorld);
psIn.normalW = mul(float4(vsIn.normalL, 1.0f), mWorld);
return psIn;
}
//--------------------------------------------------------------------------------------
// Pixel Shader
//--------------------------------------------------------------------------------------
float4 PS(VS_OUTPUT psIn) : SV_Target
{
return float4(1.0f, 1.0f, 1.0f, 1.0f);
}
Instead I'm just seeing the clear color background.