Apply an approximate bilateral blur to a texture. This can be used to blur while preserving edges, or even to upscale and blur a small texture. The approximate implementation in Rendu is based on the one demonstrated in G3D (McGuire M., Mara M., Majercik Z., http://casual-effects.com/g3d, 2017), and relies on a separable Gaussian blur with adjusted weights and an extra step distance.
More...
#include <BilateralBlur.hpp>
|
| void | resize (uint width, uint height) |
| |
|
|
Texture | _intermediate |
| | Intermediate texture.
|
| |
|
Program * | _filter |
| | Bilateral hader.
|
| |
Apply an approximate bilateral blur to a texture. This can be used to blur while preserving edges, or even to upscale and blur a small texture. The approximate implementation in Rendu is based on the one demonstrated in G3D (McGuire M., Mara M., Majercik Z., http://casual-effects.com/g3d, 2017), and relies on a separable Gaussian blur with adjusted weights and an extra step distance.
◆ BilateralBlur()
| BilateralBlur::BilateralBlur |
( |
const std::string & |
name | ) |
|
Constructor.
- Parameters
-
| name | debug name for internal buffers |
◆ process()
| void BilateralBlur::process |
( |
const glm::mat4 & |
projection, |
|
|
const Texture & |
src, |
|
|
const Texture & |
depthTex, |
|
|
const Texture & |
normalTex, |
|
|
Texture & |
dst |
|
) |
| |
Apply the bilateral blur to a texture and write the result in a texture.
- Note
- It is possible to use the same texture as input and output.
- Parameters
-
| projection | the camera projection matrix |
| src | the texture to blur/upscale |
| depthTex | the depth texture |
| normalTex | the view-space normal texture |
| dst | the destination texture |
◆ resize()
| void BilateralBlur::resize |
( |
uint |
width, |
|
|
uint |
height |
|
) |
| |
|
private |
Resize the internal intermediate buffers.
- Parameters
-
| width | the new resolution width |
| height | the new resolution height |
The documentation for this class was generated from the following files: