TheReclif
TheReclif

Reputation: 11

Which shaders have to have input layout?

I'm creating a game based on DirectX 11.1. Now I'm coding shaders part and I have one question: How many shader types have to have their own separate input layout? I have every existing DirectX 11.1 in mind, including compute shaders, geometry shaders and other.

Upvotes: 0

Views: 117

Answers (1)

cehnehdeh
cehnehdeh

Reputation: 527

Assuming you're talking about ID3D11InputLayout, the only shader stage that requires this is the vertex shader. The other stages have their inputs/outputs defined as the arguments and return types of their main function, respectively.

Upvotes: 2

Related Questions