class RED::RenderShaderAAFilter
2D anti-aliasing post-processing filter. More...
#include <REDRenderShaderAAFilter.h>
Inherits: RenderShader.
Public functions:
RenderShaderAAFilter ( RED::AA_FILTER iFilterName, const RED::Object * iTexture, RED::Object * iResMgr, RED_RC & oErrorCode ) | |
virtual | ~RenderShaderAAFilter ( ) |
virtual void * | As ( const RED::CID & iCID ) |
virtual const void * | As ( const RED::CID & iCID ) const |
template< class T_As > const T_As * | As ( ) const |
template< class T_As > T_As * | As ( ) |
Public static functions:
static RED_RC | EvaluateFromInputParameters ( RED::RenderShader * ioShader, RED::Object * iResMgr ) |
static RED::CID | GetClassID ( ) |
static RED_RC | LoadProgram ( RED::String & oString, const RED::ShaderProgramID & iID ) |
Detailed description:
2D anti-aliasing post-processing filter.
This shader implements a 2D screen space anti-aliasing filter as a post-processing. It takes an input texture and return an anti-aliased version of that texture for all pixels in the image.
This shader can be used as rendering shader for a material assigned to a screen sized quadrilateral. If the quad's geometry is matching the input texture size - which is the usual way to use this shader - it performs a camera viewport sized anti-aliasing filter on the provided source .
The source image may be any 2D image. Linear filtering must be enabled on the image for the shader to produce anti-aliased results. See RED::IImage2D::SetFilterModes.
This shader uses the RED::MCL_VERTEX channel of the input geometry.
This shader has no indirect lighting configuration and only creates the RED::HW_GENERIC hardware configuration.
All parameters declared by this shader are using the RED_SHAD_TARGET_LIGHT_NO_LIGHT shader target (commonly used in its shortcut form RED_L0).
See the REDRenderShaderAAFilter.h file documentation for the list of all define statements used to name all parameters of this shader.
Functions documentation
public RED::RenderShaderAAFilter::RenderShaderAAFilter | ( | RED::AA_FILTER | iFilterName, |
const RED::Object * | iTexture, | ||
RED::Object * | iResMgr, | ||
RED_RC & | oErrorCode | ||
) |
Constructor.
Parameters:
iFilterName: | The anti-aliasing filter to use. |
iTexture: | Source image to process. |
iResMgr: | The cluster's resource manager. |
oErrorCode: | Indicates a construction failure when not returned set to RED_OK. |
public virtual RED::RenderShaderAAFilter::~RenderShaderAAFilter | ( | ) |
Destructor.
public static RED_RC RED::RenderShaderAAFilter::EvaluateFromInputParameters | ( | RED::RenderShader * | ioShader, |
RED::Object * | iResMgr | ||
) |
Evaluate a shader from its input parameters.
Parameters:
ioShader: | Shader to redefine using its own input parameters. |
iResMgr: | The cluster's resource manager. |
Returns:
RED_BAD_PARAM if iShader was not valid,
RED_BAD_PARAM if an invalid parameter was found during the evaluation,
RED_ALLOC_FAILURE if a memory allocation has failed,
Other RED_RC related to shader creation can be returned.
public static RED::CID RED::RenderShaderAAFilter::GetClassID | ( | ) |
Reimplements: RED::RenderShader::GetClassID.
public static RED_RC RED::RenderShaderAAFilter::LoadProgram | ( | RED::String & | oString, |
const RED::ShaderProgramID & | iID | ||
) |
Loads a shader program.
Generates a shader program that corresponds to the specified iID.
Parameters:
oString: | The created program string. |
iID: | The shader program unique ID. |
Returns:
RED_ALLOC_FAILURE if an allocation has failed,
RED_FAIL otherwise.
public virtual void * RED::RenderShaderAAFilter::As | ( | const RED::CID & | iCID | ) |
Converts the object to an instance of the given type.
Parameters:
iCID: | Requested class. |
Returns:
Reimplements: RED::RenderShader::As.
public virtual const void * RED::RenderShaderAAFilter::As | ( | const RED::CID & | iCID | ) const |
Converts the object to an instance of the given type.
Parameters:
iCID: | Requested class. |
Returns:
Reimplements: RED::RenderShader::As.
template< class T_As > public const T_As * RED::RenderShaderAAFilter::As | ( | ) const |
Template version of the as const method.
Simply set T to be the class you want to retrieve an interface to.
Returns:
Reimplements: RED::RenderShader::As.
template< class T_As > public T_As * RED::RenderShaderAAFilter::As | ( | ) |
Template version of the as method.
Simply set T to be the class you want to retrieve an interface to.
Returns:
Reimplements: RED::RenderShader::As.