Image COlor Effects : B&W, Sepia...

Started by
14 comments, last by InRicomWeTrust 19 years, 11 months ago
Rendering to texture is not that slow. I had no problem doing it twice per frame with 512x512 texture, and with quite expensive shaders. The point it that you keep texture on GPU (don''t read it back to CPU) and then draw it like fullscreen quad. Effects as grayscale or colorization are trivial to implement on even GF1. If you are targeting higher (GF-FX/R9xxx) then possibilitys are endless. In any case no need to use CPU for anything.

You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
Advertisement
I may be completely wrong here, but wouldn't it be possible to use grey scale/sepia toned textures and vertex colors and avoid using colored lights? No shaders, no render to textures. KISS.
If you have to turn the effect on/off then it might get too expensive though (multiple textures and VBs)

EDIT: doh.. Didn't catch the part about "render my scene and then add a filter"..

[edited by - frostburn on May 11, 2004 2:20:27 AM]
quote:Original post by _DarkWIng_
Rendering to texture is not that slow. I had no problem doing it twice per frame with 512x512 texture, and with quite expensive shaders. The point it that you keep texture on GPU (don''t read it back to CPU) and then draw it like fullscreen quad. Effects as grayscale or colorization are trivial to implement on even GF1. If you are targeting higher (GF-FX/R9xxx) then possibilitys are endless. In any case no need to use CPU for anything.

You should never let your fears become the boundaries of your dreams.


This would require (to me at least) higher class hardware (GF3/4 and up) and is therefore not an option. But yes, readin the texture into RAM for editing won''t cut it. Real men do it in GDI anyway...


Matrix: what you suggested is hardly considered real-time.
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
quote:Original post by Crispy
This would require (to me at least) higher class hardware (GF3/4 and up) and is therefore not an option.

What would require GF3? Turning color into grayscale is just one dot product. Colorization is a dot product and multiplication (this sometimes looks fake) or 3 dot products (can be much better). If you want to go for something really fancy you need FP (to convert to HSV/HSL color space and back)


You should never let your fears become the boundaries of your dreams.

[edited by - _DarkWIng_ on May 11, 2004 11:26:46 AM]
You should never let your fears become the boundaries of your dreams.
quote:Original post by _DarkWIng_
What would require GF3? Turning color into grayscale is just one dot product. Colorization is a dot product and multiplication (this sometimes looks fake) or 3 dot products (can be much better). If you want to go for something really fancy you need FP (to convert to HSV/HSL color space and back)


I''m sorry I''m a bit ignorant in this area - how exactly would you do this without pixel shaders or something equivalent (either in VRAM or on the frame buffer)? AFAIK GF3 is the first card to have pixel shaders, am I not right?

PS - true greyscale has got nothing to do with dot products.

"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
True greyscale can't be done even on GF3/4 (I think). But you can fake it on GF1 with abuse of dot product (grey = R*Rf+G*Gf+B*Bf).

You should never let your fears become the boundaries of your dreams.

[edited by - _DarkWIng_ on May 12, 2004 4:10:51 AM]
You should never let your fears become the boundaries of your dreams.

This topic is closed to new replies.

Advertisement