Hello,

I'm trying to make a mask for layer. And doing this: var mask : int = ~(256);

Result is: -257

That is not at all a "bitwise NOT" for 256.

Why it is so?

That actually is the correct answer

+256 = 00000000000000000000000100000000

-257 = 11111111111111111111111011111111