Friday, January 9, 2009

Post Processing

I've tried to learn how to obtain a bloom effect like that you've seen on previous post, and i've understand that the procedure is:

- render the scene not into the back buffer but into a texture.
- for each pixel of the texture: if the bright is major than a value, increase it. else leave it black. Then blur the result, and add to the original source.

Anyway all is made using pixel shaders, so i've started to learn how to apply a pixel shader not only to a mesh but to the whole scene.

In this video you can see my first experiment, a simple "underwater" shader (i've used not tau ceti but a more simple project to do the job quick and dirty). It's just a first step to make a more complex post processing procedure.

--

Ho cercato di capire come ottenere l'effetto bloom che vi ho illustrato nel post precedente.
Studiando ho capito che la procedura da seguire e' la seguente:

- Renderizzare la scena non a video ma in una texture.
- Tramite pixel shaders, prendere la texture e per qualsiasi pixel: controllare la luminosita', se e' maggiore di una certa soglia aumentarla ancor di piu', altrimenti lasciar nero, eseguire un blur gaussiano e aggiungere il risultato all'immagine sorgente.

Quindi bisogna modificare la procedura di rendering e creare dei pixel shaders per eseguire il post processing.

Vi mostro un esperimento.. e' un effetto "subaqueo" che ho creato giocando un po' con le coordinate uv della texure.. non c'entra con tau ceti, ma e' la base per poi costruire effetti complessi.

3 comments:

Marte said...

non é che... hai in mente di farci scendere sui pianeti ? :P

Marte

PdG said...

thank you!

Anonymous said...

alotlySwoto [url=http://wiki.openqa.org/display/~buy-codeine-no-prescription-online]Buy Codeine no prescription online[/url] [url=http://wiki.openqa.org/display/~buy-differin-no-prescription-online]Buy Differin no prescription online[/url]