Bitwise operators in DX9 ps_2_0 shader

Posted by lapin on Game Development See other posts from Game Development or by lapin
Published on 2012-06-12T20:54:27Z Indexed on 2012/06/12 22:49 UTC
Read the original article Hit count: 578

Filed under:
|
|

I've got the following code in a shader:

// v & y are both floats
nPixel = v;
nPixel << 8;
nPixel |= y;

and this gives me the following error in compilation:

shader.fx(80,10): error X3535: Bitwise operations not supported on legacy targets.
shader.fx(92,18): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression
ID3DXEffectCompiler: Compilation failed

The error is on the following line:

nPixel |= y;

What am I doing wrong here?

© Game Development or respective owner

Related posts about directx

Related posts about shaders