View Full Version : Black&White scene
10-16-2000, 02:14 AM
I would like to switch a scene in black&white without reloading all my texture or changing screen mode?
Is there any solution with alpha-blending (multiplicative or add) ? or even a solution?
If someone has got an iD ...
10-16-2000, 08:35 PM
I assume you mean greyscaled by b/w...
Only thing I can think of is reading back the color buffer, converting it to greyscale and writing the result to the color buffer again. If the greyscale conversion is supposed to be quick, just add r, g and b of each pixel (keep conversion in mind for 24bit color buffer - 3*8=24bit so use 32bit integer to store the result), divide by 3 and write the result to r, g and b of each pixel. If it's supposed to look good, use an optical correct greyscale conversion.
Maybe, if you're not using alpha channels in your textures, you could use the alpha to store the greyscale values (8 bit alpha gives you 256 shades) in your textures. Then render the scene and copy the alpha buffer to the color buffer?
in the first result it should be
or it wont look right
this is what bw tv does
10-17-2000, 05:35 AM
In Windows, depending upon the dynamic range of colors used in the scene, playing around with SetDeviceGammaRamp(...) may be able to acheive a mono-color effect (not necessarily B&W). But this effect applies to the display device in general so you'd only want to do that in fullscreen mode.
[This message has been edited by DFrey (edited 10-17-2000).]
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.