I found this example of implementing Phong lightning in hlsl. It is first snippet where I see that strange syntax where you declare variables in hlsl like here:
float3 materialEmissive : EMISSIVE;
float3 materialAmbient : AMBIENT;
In usual instead of EMISSIVE
or AMBIENT
I used to declare position in register like:
float3 materialEmissive : register(c0);
float3 materialAmbient : register(c1);
Why would I declare variables like in example from link? I checked DirectX documentation, but didn't find whether EMMISIVE
or AMBIENT
are some key words in hlsl.