shader - Do #defines in HLSL add any performance overhead? -
in hlsl preprocessor equivalent 1 in c(++) literally alters code before compilation? if case using such methods seem allow specializing shader without adding run-time conditional statements... true?
#define
s work expect them to. evaluated @ compile-time.
if check output of compiler sure there no (unnecessary) branching occurring, use /fc <file>
option hlsl compiler (fxc) generate assembly listing of compiled shader.
Comments
Post a Comment