It basically doesn't matter.
#define uses token-pasting to insert the specified value into the shader code whereever it occurs; the shader itself will see the token as if you simply hard-coded it at every occurrence instead.
static const variable in, in actuality, a variable. Specifically, it is a variable that is initialized once, whose value persists between function calls, and which cannot be changed. Being a variable, can have the same things that all other variables can have: additional storage and type specifiers (
precise), more complex types (such as
float4), semantics and register assignments (see here for all the things). However, specifically for
static const variables, most of those extras aren't allowed or don't apply (particularly since a global static is not visible to the application code).
static const version may allow some compiler optimizations (minor ones), especially if the type of the variable is more complex (such as a
float4 or matrix type), but that seems unlikely to matter much.
In the end, choose the one you prefer stylistically.