When I define the cBuffer
in hlsl
, some examples shows
cbuffer cbPerObject
{
matrix worldMatrix;
matrix viewMatrix;
matrix projectionMatrix;
};
And the other shows
cbuffer cbPerObject
{
float4x4 worldMatrix;
float4x4 viewMatrix;
float4x4 projectionMatrix;
};
Does it means that type of matrix can have unlimited elements but float4x4 can just hold the first 16 elements?
which one do you prefer in HLSL?