🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

IA Output is Not the Same as VS Input

Started by
1 comment, last by PAM79 1 year, 2 months ago

I have a problem where my IA's output is not the same as my VS's input.

IA Output
VS Output

My VS is very straightforward, taking in a position, and outputting a position:

float4 main(float3 position : POSITION, float2 texcoord : TEXCOORD, float3 normal : NORMAL, float3 tangent : TANGENT) : SV_POSITION {
	return float4(position, 1.0f);
}

I thought that it could be the format in my input layout, but I do not see a problem with it.

static constexpr D3D12_INPUT_ELEMENT_DESC input_layout[] = {
 	{ "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0,        D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
 	{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT,  0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
 	{ "NORMAL",  0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
 	{ "TANGENT", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }
};

My VS file is “vs_5_0”, just like how I compile it.

I do not see really any other option that could be affecting the VS and its inputs.

Advertisement

Remember that if no optional stages are enabled before the rasterizer, the vertex shader must output vertices in homogeneous clip coordinates.

How is the cube defined in the vertex buffer?

This topic is closed to new replies.

Advertisement