Skip to main content
gamedev.net
🔒 Locked

Post process order?

Started by NumberXaero Jul 23, 2014 at 2:35 AM 2 replies 4.9k views
Original Post
NumberXaero
NumberXaero

Wondering what people think, or what you do yourself and why, stick any I may have missed in.

Screen space reflections - havent done them, not sure where, close to start?...
Eye Adaptation - builds info probably done early?
Lens flare - get it in before bloom?

Bloom - before dof ??
DOF - you want the bloom 'under' it?

FXAA - you want to AA toward then end right?

Color Correction - want final color, before correcting...

Tone Mapping - fit for ldr

Gamma Correction - correct for screen output

Vignette - because its just black on top of everything else...

Hodgman
Hodgman

SSR is part of the lighting - so it gets done at the same time as lighting (early).

Eye adaptation takes it's input from the final HDR lighting buffer (after all lighting is calculated), but it doesn't change the screen -- it's just an extra input into the tone-mapper.

Lens flare and bloom are the same effect - blurring/distortion/etc in the camera lens, so they happen at the same time.

I would do bloom after DOF, otherwise the results from the bloom will be smudged around by the DOF -- you might notice the sillhouette edges of objects forming lines through your bloom... but neither order is physically correct, so try both wink.png

I do color correction, tone-mapping, gamma and vignetting all in the one shader. First I do vignetting, then tone-map from HDR to 8-bit, then do gamma correction, then colour correction using a LUT. I do vignetting on the HDR data, because it's basically a lighting/shadowing effect. You can also do it after tone-mapping, but you get different results (try both!).

FXAA doesn't work on HDR data, so you have to do it after tone-mapping.

The above is for high quality / high system specs.

For older hardware, I do tone-mapping/colour-correction/gamma-correction before DOF -- because it's much faster on old hardware to blur 8-bit data than HDR data!

In this configuration, you've got some more options with FXAA -- It's interesting to do FXAA before DOF, because then you're blurring an anti-aliased image, which gives better results in the DOF'ed areas... However, the DOF itself creates aliasing around edges... which can be fixed up by doing FXAA after DOF. Again, try both!
Vilem Otte
Vilem Otte

Just a note - if you are doing standard AA (or technically any solid AA technique), it should be resolved AFTER tone mapping (otherwise it won't work right).

kalle_h
kalle_h

SSR is part of the lighting - so it gets done at the same time as lighting (early).

Eye adaptation takes it's input from the final HDR lighting buffer (after all lighting is calculated), but it doesn't change the screen -- it's just an extra input into the tone-mapper.

Lens flare and bloom are the same effect - blurring/distortion/etc in the camera lens, so they happen at the same time.

I would do bloom after DOF, otherwise the results from the bloom will be smudged around by the DOF -- you might notice the sillhouette edges of objects forming lines through your bloom... but neither order is physically correct, so try both wink.png

I do color correction, tone-mapping, gamma and vignetting all in the one shader. First I do vignetting, then tone-map from HDR to 8-bit, then do gamma correction, then colour correction using a LUT. I do vignetting on the HDR data, because it's basically a lighting/shadowing effect. You can also do it after tone-mapping, but you get different results (try both!).

FXAA doesn't work on HDR data, so you have to do it after tone-mapping.

The above is for high quality / high system specs.

For older hardware, I do tone-mapping/colour-correction/gamma-correction before DOF -- because it's much faster on old hardware to blur 8-bit data than HDR data!

In this configuration, you've got some more options with FXAA -- It's interesting to do FXAA before DOF, because then you're blurring an anti-aliased image, which gives better results in the DOF'ed areas... However, the DOF itself creates aliasing around edges... which can be fixed up by doing FXAA after DOF. Again, try both!

When film grain should be used? How about chromatic aberration? I do these at linear space before tone mapping but I think these do affect FXAA negatively.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.