#include <depthrendertarget.h>
Public Member Functions | |
DepthRenderTarget (Core &core) | |
~DepthRenderTarget () | |
virtual bool | init (utility::ErrorState &errorState) override |
virtual void | beginRendering () override |
virtual void | endRendering () override |
virtual const glm::ivec2 | getBufferSize () const override |
virtual void | setClearColor (const RGBAColorFloat &color) override |
virtual const RGBAColorFloat & | getClearColor () const override |
virtual ECullWindingOrder | getWindingOrder () const override |
virtual VkRenderPass | getRenderPass () const override |
virtual VkSampleCountFlagBits | getSampleCount () const override |
virtual bool | getSampleShadingEnabled () const override |
virtual VkFormat | getColorFormat () const override |
virtual VkFormat | getDepthFormat () const override |
DepthRenderTexture2D & | getDepthTexture () |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
float | mClearValue = 1.0f |
Property: 'ClearValue' value selection used for clearing the render target. More... | |
bool | mSampleShading = true |
Property: 'SampleShading' Reduces texture aliasing when enabled, at higher computational cost. More... | |
ERasterizationSamples | mRequestedSamples = ERasterizationSamples::One |
Property: 'Samples' The number of samples used during Rasterization. For better results turn on 'SampleShading'. More... | |
ResourcePtr< DepthRenderTexture2D > | mDepthTexture |
Property: 'DepthTexture' depth texture to render to. More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
A resource that is used to render one or multiple objects to nap::DepthRenderTexture2D exclusively. Usage of this target creates a graphics pipeline that skips the fragment shader stage of all material instances.
This objects requires a link to a nap::DepthRenderTexture2D to store the result of the render pass. Only render to a render target within a headless recording pass, failure to do so will result in undefined behavior. Make sure to call beginRendering() to start the render pass and endRendering() to end the render pass. Always call RenderService::endHeadlessRecording after having recorded all off-screen render operations.
DepthRenderTarget | ( | Core & | core | ) |
Every render target requires a reference to core.
core | link to a nap core instance |
~DepthRenderTarget | ( | ) |
Destroys allocated render resources
|
overridevirtual |
Starts the render pass. Only start the render pass after a successful call to RenderService::beginHeadlessRecording().
Implements IRenderTarget.
|
overridevirtual |
Ends the render pass. Always call this after beginRendering().
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
DepthRenderTexture2D& getDepthTexture | ( | ) |
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Implements IRenderTarget.
|
overridevirtual |
Geometry winding order, defaults to clockwise.
Implements IRenderTarget.
|
overridevirtual |
Initializes the render target, including all the required resources.
errorState | contains the error if initialization failed. |
Reimplemented from Object.
|
overridevirtual |
Updates the render target clear value. Stores the red component of color
as the clear value.
color | the new clear value to use. |
Implements IRenderTarget.
float mClearValue = 1.0f |
Property: 'ClearValue' value selection used for clearing the render target.
ResourcePtr<DepthRenderTexture2D> mDepthTexture |
Property: 'DepthTexture' depth texture to render to.
ERasterizationSamples mRequestedSamples = ERasterizationSamples::One |
Property: 'Samples' The number of samples used during Rasterization. For better results turn on 'SampleShading'.
bool mSampleShading = true |
Property: 'SampleShading' Reduces texture aliasing when enabled, at higher computational cost.