   Shader variable as bitmask
  Is it possible to take 8-bit channel from a variable and use it as a bitmask inside a vertex shader, e.g.float4 bitmask = 5; // 10100000// This will then be used as the first and thierd flag set in further computations.   
  No, this is not possible (unless I've misunderstodd what you're asking) because the "bitwise or" and "bitwise and" operators are not supported in HLSL.   