Archived

This topic is now archived and is closed to further replies.

ms291052

Color Inversions?

Recommended Posts

ms291052    223
Anyone know how to invert the colors in D3D? I mean simply render the scene in inverted Colors (e.g. purple turns green, yellow goes blue, etc).

Share this post


Link to post
Share on other sites
JohnBolton    1372
It depends what you mean by "invert". The simplest inversion is done simply by subtracting each of the components from their highest possible values (generally 1 or 255). This will also invert the brightness. I believe there is a D3DX function that does this.

Or, if you just want to invert the hue, then you have to convert the color from RGB to HLV, invert the hue, and convert back.

Share this post


Link to post
Share on other sites