In hlsl, we always see this
cbuffer cbPerFrame
{
float2 gRasterSize;
float4x4 gView;
int gVoxelDim;
float3 gVoxelSize;
};
cbuffer cbPerObject
{
float gObjectID;
float4x4 gWorld;
};
I know that the group cbPerFrame is to update variables every frame.
The other group cbPerObject is to update variables per object per frame, for example 2 times per frame in this case.
But how can hlsl know that? cbPerFrame and cbPerObject are just names but not semantics.
When we define different groups, does hlsl really know how many times this group should update every frame?