#include <rendertotexturecomponent.h>
Public Attributes | |
ResourcePtr< RenderTexture2D > | mOutputTexture = nullptr |
Property: 'OutputTexture' the target of the render step. More... | |
MaterialInstanceResource | mMaterialInstanceResource |
Property: 'MaterialInstance' instance of the material, used to override uniforms for this instance. More... | |
ERasterizationSamples | mRequestedSamples = ERasterizationSamples::One |
Property: 'Samples' The number of samples used during Rasterization. For better results enable 'SampleShading'. More... | |
RGBAColor8 | mClearColor = { 255, 255, 255, 255 } |
Property: 'ClearColor' the color that is used to clear the render target. More... | |
bool | mSampleShading = true |
Property: 'SampleShading' Reduces texture aliasing when enabled, at higher computational cost. More... | |
bool | mPreserveAspect = false |
Property: 'PreserveAspect' Whether to preserve the texture aspect ratio. More... | |
![]() | |
bool | mVisible = true |
Property: 'Visible' if this object is rendered to target by the render service. More... | |
ResourcePtr< RenderLayer > | mLayer |
Property: 'Layer' the render layer assigned to this component. More... | |
std::vector< ResourcePtr< RenderTag > > | mTags |
Property: 'Tags' List of tags specifying the category this render component belongs to. More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
![]() | |
virtual void | getDependentComponents (std::vector< rtti::TypeInfo > &components) const |
virtual const rtti::TypeInfo | getInstanceType () const =0 |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
virtual bool | init (utility::ErrorState &errorState) |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Renders an effect directly to a texture using a custom material without having to define a render target or mesh. Use this component as a post process render step. This component manages its own render target and plane to render to. The plane is automatically scaled to fit the bounds of the render target.
Simply declare the component in json and call RenderToTextureComponentInstance::draw() in the render part of your application, in between nap::RenderService::beginHeadlessRecording() and nap::RenderService::endHeadlessRecording().
This component expects a material with a shader that contains both a model and projection matrix uniform. The view matrix uniform is optional. It will be set if found, otherwise bypassed. If you don't care about view space (camera) transformation, don't declare it.
RGBAColor8 mClearColor = { 255, 255, 255, 255 } |
Property: 'ClearColor' the color that is used to clear the render target.
MaterialInstanceResource mMaterialInstanceResource |
Property: 'MaterialInstance' instance of the material, used to override uniforms for this instance.
ResourcePtr<RenderTexture2D> mOutputTexture = nullptr |
Property: 'OutputTexture' the target of the render step.
bool mPreserveAspect = false |
Property: 'PreserveAspect' Whether to preserve the texture aspect ratio.
ERasterizationSamples mRequestedSamples = ERasterizationSamples::One |
Property: 'Samples' The number of samples used during Rasterization. For better results enable 'SampleShading'.
bool mSampleShading = true |
Property: 'SampleShading' Reduces texture aliasing when enabled, at higher computational cost.