I'm studying HLSL cookbook. In that sample code, author used a lot of register sementic.
like this
cbuffer cbPointLightDomain : register( b0 )
{
float4x4 LightProjection : packoffset( c0 );
}
cbuffer cbPointLightPixel : register( b1 )
{
float3 PointLightPos : packoffset( c0 );
float PointLightRangeRcp : packoffset( c0.w );
float3 PointColor : packoffset( c1 );
float2 LightPerspectiveValues : packoffset( c2 );
}
what is benefit of this?
actually I erased every register keywords and ran program.
the result is completely fine.