Jump to content
  • Advertisement

Archived

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

ms291052

Color Inversions?

This topic is 5408 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!