# Tag Info

20

The depth of field is a characteristic of a camera lens setting, although the name "Depth of Field" is commonly used to describe the effect caused by such characteristic. Camera lenses can only perfectly focus on one single point, but there is a distance for which the image will still look reasonably sharp. Such distance is what actually the Depth Of Field ...

13

If I did two Gaussian blurs of size N, would that be the same mathematically as doing one Gaussian blur of size 2N? Almost. Applying two Gaussian blurs is equivalent to doing one Gaussian blur, but with a slightly different size calculation. Applying a Gaussian blur to an image means doing a convolution of the Gaussian with the image. Convolution is ...

10

This is a potentially confusing re-use of terminology. Ambient Occlusion is not in itself a post processing effect. Screen Space Ambient Occlusion is a post processing effect using the depth buffer to approximate the effects produced by Ambient Occlusion. Ambient Occlusion is a relatively expensive global method, while Screen Space Ambient Occlusion is the ...

8

There are several techniques used. A simple, but limited, post-process approach that is not really used any more consists in reconstructing the world space position of a pixel using both the view projection matrix from current and previous frame. Using these two values you can compute the velocity at a pixel and blur accordingly, sampling along the ...

6

In theory, it is possible to stuff every sample distribution into a texture to "pre-bake" it for fast access. The question is whether any of the results might be useful. For blue noise, this makes a lot of sense, as blue noise distributions have global influence and are hard to evaluate at runtime. Uniform random sampling, on the other hand, is so simple ...

6

Short answer, set the precision of the image to a higher value. Long answer, When looking at a gamma correction curve, you can see that the lower values get changed much more, this means that the difference between lower values will get greater and that causes this effect. You have a limited amount of values for a color channel and this means that when it ...

4

Ambient occlusion isn't a technique, but rather a concept. It can be implemented (and approximated) as a post-processing effect such as SSAO, SSDO, HBAO+, etc. @trichoplax gave a good answer, I just wanted to elaborate on the comments. Is there a reason why it's considered post-processing and deferred lighting/shading isn't? I personally would consider ...

4

If I understand your question, you are asking how to actually perform said directional blur in code? A Gaussian blur is typically done by sampling your image in all directions around your current point (or if in 2 passes, one vertical and one horizontal which equates to the same thing), with a specific set of weights for the falloff. For a directional blur ...

4

One strategy mentioned in Brian Karis's talk about TAA is neighborhood clamping. The general idea is that, for the previous frame's pixel to be valid, its color should be in the color range found in the neighborhood (say 3x3 pixels) of the current pixel this frame. This rejects history from changing light conditions, which is probably what you want anyway ...

4

It's generally a good idea to add noise like this when you're using a gradient, to avoid visible banding in the gradient, especially on smartphones. Often smartphone screens claim to be 24-bit colour but the panel itself is actually only 16 or 20 bit. The chief difference between the example and your attempt to reproduce it is that your noise is in RGB ...

3

First we can calculate the physical diameter of CoC in the image plane, given the lens parameters. This equation is from Wikipedia – Circle of confusion: $$c = {|S_2 - S_1| \over S_2} {f^2 \over N(S_1 - f)}$$ where the variables are: $c$: the physical CoC diameter in the image plane $S_1$: focal distance (the distance at which a subject would be in ...

1

I found the problem. By zeroing the sampler description I implicitly set LOD bounds to 0. After adding descSampler.MinLOD = 0; descSampler.MaxLOD = D3D11_FLOAT32_MAX; the mipmap works as expected. Thank you for your attention :-)

1

I don't have enough rep to add a comment so... You could use a post process based anti-aliasing technique like FXAA or SMAA. Also, if performance is not a priority, you could go for SSAA. Another option could be to write to a multi sampled texture (I'm not 100% sure if that is possible in your case).

Only top voted, non community-wiki answers of a minimum length are eligible