Skip to content

LiteFX::Rendering::IRenderTarget::isVolatile

Returns true, if the target should not be made persistent for access after the render pass has finished.

Synopsis

Declared in <litefx/rendering_api.hpp>

[[dllimport, dllexport]] virtual bool isVolatile() const noexcept = 0;

Description

A render target can be marked as volatile if it does not need to be accessed after the render pass has finished. This can be used to optimize away unnecessary GPU/CPU memory round-trips. For example a depth buffer may only be used as an input for the lighting stage of a deferred renderer, but is not required after this. So instead of reading it from the GPU after the lighting pass has finished and then discarding it anyway, it can be marked as volatile in order to prevent it from being read from the GPU memory again in the first place.

Return Value

true, if the target should not be made persistent for access after the render pass has finished.

See Also

flags

RenderTargetFlags