Original Post
I read in the pdf about hl2 shading :
Quote:How do you set hlsl constant without using a constant table ? I see how for texture sampler and texture, but not for constant : integer, matrix etc. Thanx EDIT: http://www2.ati.com/developer/gdc/D3DTutorial10_Half-Life2_Shading.pdf.
Constant Controls •Direct-mapped to specific registers –Consistency with legacy paths –Don’t have to deal with HLSL constant table const float4g_EnvmapTint: register( c0 ); const float3g_EnvmapContrast: register( c2 ); const float3g_EnvmapSaturation: register( c3 ); const float4g_FresnelReflectionReg: register( c4 ); const floatg_OverbrightFactor: register( c6 ); const float4g_SelfIllumTint: register( c7 );