Understanding Shader Programming
问题 I am trying to understand shader programming, but at this point, documentation wont help me further. 1] Does the data type & size of the buffers have to match? In the DX tutorial 4 from the DX SDK, they have a struct: struct SimpleVertex{ XMFLOAT3 Pos; XMFLOAT4 Color; }; While in their shader file, they define: struct VS_OUTPUT{ float4 Pos : SV_POSITION; float4 Color : COLOR0; }; They define Pos as a vector of 3 in one file, while it is 4 in another. How is this correct? I thought the size of