<p><a href="http://developer.download.nvidia.com/assets/gamedev/files/sdk/11/OpacityMappingSDKWhitePaper.pdf">Nearest-depth filtering</a> is an alternative to bilaterial filtering that was specifically developed for upsampling low-resolution transparent rendering. It's a bit simpler than bilateral sampling, in that it only requires one sample from your low-resolution texture. However it can still have issues, particularly with high-frequency geometry that isn't well-represented in your low-resolution depth buffer.</p>

<p>At SIGGRAPH 2013, Bungie presented a new approach for handling very-low-resolution particles using what they called a "variance depth map". You can find the slides <a href="http://advances.realtimerendering.com/s2013/index.html">here</a> in PDF and PPTX format. </p>

<p>One interesting approach that hasn't been used yet (at least, to my knowledge) would be to leverage MSAA. The idea is that you take your full-resolution depth buffer, and then alias it (or convert it, if the API doesn't allow you to do so) as a 4xMSAA depth buffer with half the width and height. You could then render your low-resolution transparents to a half-resolution render target with 4xMSAA, using your "4xMSAA" depth buffer for depth testing. Then to upscale, for each high-resolution pixel you would access the corresponding subsample from your low-resolution MSAA render target, and blend it on top. This would give you full-resolution depth testing, but half-resolution shading (with framebuffer bandwidth somewhere in between full-res and half-res due to compression). The catch here is that you need programmable MSAA sample points to do this, since you'll want to use an ordered grid sampling pattern for your low-resolution rendering instead of the typical rotated grid pattern. Newer GPU's (Maxwell from Nvidia, GCN from AMD) support doing this through vendor extensions in <a href="https://developer.nvidia.com/nvapi">D3D11</a> and <a href="https://developer.nvidia.com/sites/default/files/akamai/opengl/specs/GL_NV_sample_locations.txt">OpenGL</a>, and it can be done natively on consoles.</p>

CC BY-SA 3.0
2015-08-27T02:17:52.843Z
Hey mjp how are you. I remember you from gamedev.net. I asked a question about actual usages of curves in games and I remember you gave some good info.  Howdy!
Alan Wolfe
CC BY-SA 3.0
2015-08-26T22:00:26.977Z
2015-08-26T22:00:26.977Z
MJP
<p>It is a well known "standard" to use bilateral upscaling when it comes to comes to combine a low resolution target and an higher res one. </p>

<p>I have personally noticed that using the basic algorithm (with weights based on depth differences between high and low res depth values) is far from perfect in situations where high res and low res are blended, say for example an high res object inside a low res effect.</p>

<ul>
<li>Jagged edges are still noticeable</li>
<li>"haloes" around edges start to appear when the objects/effects in low res occupy a smaller area on the target. By this I mean holes around the silouhette. </li>
</ul>

<p>I am well aware that there is no way to eliminate completely these problems, but is there a way to improve bilateral upsampling to partially improve on one of the two points above? </p>

<p>And as side question, is there an equivalently good algorithm or variation that is cheaper?</p>

CC BY-SA 3.0
2015-08-25T01:42:47.320Z
I hadn't heard of bilateral up sampling. Do you have any links by chance? It's different than bicubic or bilinear sampling right?
Alan Wolfe
<real-time>
How to improve on bilateral upsampling in real time scenarios
cifz
# How to improve on bilateral upsampling in real time scenarios

(Asked by: username_0 on 2015-08-22)

It is a well known "standard" to use bilateral upscaling when it comes to comes to combine a low resolution target and an higher res one.

I have personally noticed that using the basic algorithm (with weights based on depth differences between high and low res depth values) is far from perfect in situations where high res and low res are blended, say for example an high res object inside a low res effect.

* Jagged edges are still noticeable
* "haloes" around edges start to appear when the objects/effects in low res occupy a smaller area on the target. By this I mean holes around the silouhette.

I am well aware that there is no way to eliminate completely these problems, but is there a way to improve bilateral upsampling to partially improve on one of the two points above?

And as side question, is there an equivalently good algorithm or variation that is cheaper?

**Tags:** real-time

> **Comments:**
> **username_1**: I hadn't heard of bilateral up sampling. Do you have any links by chance? It's different than bicubic or bilinear sampling right?  

---

## 1 answers

### Answer by username_2 on 2015-08-26. Score: 6 | Accepted answer

[Nearest-depth filtering](http://developer.download.nvidia.com/assets/gamedev/files/sdk/11/OpacityMappingSDKWhitePaper.pdf) is an alternative to bilaterial filtering that was specifically developed for upsampling low-resolution transparent rendering. It's a bit simpler than bilateral sampling, in that it only requires one sample from your low-resolution texture. However it can still have issues, particularly with high-frequency geometry that isn't well-represented in your low-resolution depth buffer.

At SIGGRAPH 2013, Bungie presented a new approach for handling very-low-resolution particles using what they called a "variance depth map". You can find the slides [here](http://advances.realtimerendering.com/s2013/index.html) in PDF and PPTX format.

One interesting approach that hasn't been used yet (at least, to my knowledge) would be to leverage MSAA. The idea is that you take your full-resolution depth buffer, and then alias it (or convert it, if the API doesn't allow you to do so) as a 4xMSAA depth buffer with half the width and height. You could then render your low-resolution transparents to a half-resolution render target with 4xMSAA, using your "4xMSAA" depth buffer for depth testing. Then to upscale, for each high-resolution pixel you would access the corresponding subsample from your low-resolution MSAA render target, and blend it on top. This would give you full-resolution depth testing, but half-resolution shading (with framebuffer bandwidth somewhere in between full-res and half-res due to compression). The catch here is that you need programmable MSAA sample points to do this, since you'll want to use an ordered grid sampling pattern for your low-resolution rendering instead of the typical rotated grid pattern. Newer GPU's (Maxwell from Nvidia, GCN from AMD) support doing this through vendor extensions in [D3D11](https://developer.nvidia.com/nvapi) and [OpenGL](https://developer.nvidia.com/sites/default/files/akamai/opengl/specs/GL_NV_sample_locations.txt), and it can be done natively on consoles.

> **Comments:**
> **username_1**: Hey mjp how are you. I remember you from gamedev.net. I asked a question about actual usages of curves in games and I remember you gave some good info.  Howdy!  

---

