A simple helper class for temporally filtering a screen-space buffer filled with world-space data.
More...
|
shared_ptr< Texture > | apply (RenderDevice *rd, const shared_ptr< Camera > &camera, const shared_ptr< Texture > &unfilteredValue, const shared_ptr< Texture > &depth, const shared_ptr< Texture > &ssVelocity, const Vector2 &guardBandSize, int numFilterComponents=4, const Settings &settings=Settings()) |
| Do not modify the return value; it is used to write into for the next iteration. More...
|
|
shared_ptr< Texture > | apply (RenderDevice *rd, const Vector3 &clipConstant, const Vector4 &projConstant, const CoordinateFrame ¤tCameraFrame, const CoordinateFrame &prevCameraFrame, const shared_ptr< Texture > &unfilteredValue, const shared_ptr< Texture > &depth, const shared_ptr< Texture > &ssVelocity, const Vector2 &guardBandSize, int numFilterComponents=4, const Settings &settings=Settings()) |
|
const shared_ptr< Texture > & | previousTexture () const |
|
A simple helper class for temporally filtering a screen-space buffer filled with world-space data.
This is designed to be simple to use, not to maximize speed. Directly use functions from temporalFiler.glsl in a full-screen pass instead of using this class if performance or memory is a concern.
Do not modify the return value; it is used to write into for the next iteration.
numFilterComponents must be 1, 2, 3, or 4. The first numFilterComponents components will be blended according to the temporal filter, the rest will simply be copied from the current value buffer. This is useful if the signal you are filtering is only in the first N components.
If alpha = 0.0f, this directly returns unfilteredValue.