Dithering

Not so much a CUDA related question (I think).

But something I’ve thought about (apart from my procedural noise post)… Dithering…

RT dithering: generate per pixel (soft) grain with each frame (or object based). Idea left over from Photoshop (filter/texture/grain/intensity:5).

Noise or grain makes a perfect picture not too perfect (particularly nice at high res), comparable with TV static/noise maybe, or a screenshot in a magazine instead of your screen. High FPS are necessity when doing something like this. Something that crossed my mind long ago (but re-emerged when I saw rage engine).

Can dithering be done realtime (similar to for instance HDR or motion/depth blur)?
I think it’s a really nice feature for games that go for extreme realistic graphics.

Dithering is also used for sampling (music), it’s an artistic touch. Howcome it’s never used for games?

You’re wrong about it never being used. There’s a whole research area called “non-photorealistic rendering” even. You might want to look it up :)

Ok other question…

Let me put it this way… Can noise be generated independend from the frames. For instance, a game maybe running around 30 frames per second… While the noise (dithering) runs at 60Hz, at pixel level…

It should be possible. Let’s say that the game has a 30Hz loop, drawing a frame once per loop. To have 60Hz noise, you’d double the frequency of the game loop but only draw the 3D stuff every other frame, but calling the noise stuff every frame. Make the 3D stuff draw into an offscreen buffer I guess, and use the noise function as a copy-to-onscreen-buffer function.