Hi,
In the autolight.cginc file, we have a line
#define SHADOW_COORDS(idx1) unityShadowCoord4 _ShadowCoord : TEXCOORD##idx1;
Now in the UnityStandardCore.cginc file, we have an usage of this macro like this:
SHADOW_COORDS(6)
Logically speaking, if I unroll this macro, the code becomes like this:
unityShadowCoord4 _ShadowCoord : TEXCOORD##6;
“unityShadowCoord4” is another macro for datatype. Depending upon runtime platform and other settings, this basically means either float4 or fixed4 or half4 etc etc. So this code in the UnityStandardCore.cginc:
SHADOW_COORDS(6)
Bascially means like this, (for an specific runtime platform and specific lighting settings):
half4 _ShadowCoord : TEXCOORD##6;
Now my question is, what the this “##” thing in the macro definition? I am not getting what it is mean! ![]()