Skip to main content
GameDev.net gamedev.net
🔒 Locked

Shader variable as bitmask

Started by Xmon May 26, 2006 at 3:25 PM 0 replies 2.9k views
Original Post
Xmon
Xmon
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.
Brian Lawson
Brian Lawson
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.