class RED::StateShader
Rendering pipeline configuration shader class. More...
#include <REDStateShader.h>
Inherits: Shader.
Public functions:
Public static functions:
static RED::CID | GetClassID ( ) |
Public enumerations:
Protected functions:
const RED::StateShaderPlatformData * | FindPlatformData ( RED::HARDWARE_PLATFORM iPlatformID ) const |
RED::StateShaderPlatformData & | GetPlatformData ( RED_RC & oRC, RED::HARDWARE_PLATFORM iPlatformID ) |
RED::StateShaderPlatformData * | PlatformLookup ( RED::HARDWARE_PLATFORM iPlatformID, bool iExactMatch ) const |
Protected variables:
RED::Vector< RED::StateShaderPlatformData > | _platform |
Detailed description:
Rendering pipeline configuration shader class.
The RED::StateShader is used to configure the rendering pipeline for all shaders that are rendered after it in a list of shaders in a material. Hardware and software state parameters are managed using this shader. State parameters include all the parameters typically involved in the setup of a rendering pass, such as depth equation, blending mode, stencil, lines or point shapes, etc...
Transparency should be consistent across all state shaders within a material. Ray-traced transparency information will be based on an analysis of the state shaders of the material.
Default state shader parameters are set to:
- BACK face culling.
- SKIP blending mode.
- SKIP depth testing mode.
- SKIP depth writing mode.
- NO_TRANSPARENCY transparency.
- 1 pixel line width.
- Disabled line stipple,
- No polygon offset,
- Color writes enabled,
- Line and point smoothing off,
- Line thickness and point sizes set to 1,
- No displacement map,
- OFF stencil mode.
- Stencil ref = 0.0, stencil mask = 0xffffffff, stencil writemask = 0xffffffff,
- Stencil operations: all STENCIL_OP_KEEP.
The RED::StateShader supports multiple hardware platforms, as the RED::RenderShader do. On setting up a given platform for the first time, the state shader clones any more generic platform that was setup before. For example if the shader uses a give polygon offset setup for RED::HW_GENERIC platform, on setting up a parameter for the RED::HW_NVIDIA_G400 platform, all values from the RED::HW_GENERIC platform will be copied. However, once the two platform exist, there's no more copy of any setting: modifying the RED::HW_GENERIC platform will not change the RED::HW_NVIDIA_G400 platform parameters.
Functions documentation
public RED::StateShader::StateShader | ( | ) |
Construction method.
The StateShader is using a RED::HARDWARE_PLATFORM identifier for all data setup & access, in all ways similarly to the RED::RenderShader, so that the same state shader instance can behave differently on different hardware.
A state shader uses the default RED::Object ID set at its creation time.
public virtual RED::StateShader::~StateShader | ( | ) |
Destruction method.
public static RED::CID RED::StateShader::GetClassID | ( | ) |
Reimplements: RED::Shader::GetClassID.
public virtual void * RED::StateShader::As | ( | const RED::CID & | iCID | ) |
Converts the object to an instance of the given type.
Parameters:
iCID: | Requested class. |
Returns:
Reimplements: RED::Shader::As.
public virtual const void * RED::StateShader::As | ( | const RED::CID & | iCID | ) const |
Converts the object to an instance of the given type.
Parameters:
iCID: | Requested class. |
Returns:
Reimplements: RED::Shader::As.
template< class T_As > public const T_As * RED::StateShader::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::Shader::As.
template< class T_As > public T_As * RED::StateShader::As | ( | ) |
Template version of the as method.
Simply set T to be the class you want to retrieve an interface to.
Returns:
Reimplements: RED::Shader::As.
public virtual RED::Shader * RED::StateShader::Clone | ( | ) const |
public RED_RC RED::StateShader::GetAlphaThreshold | ( | float & | oAlpha, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets the alpha masking threshold.
Parameters:
oAlpha: | The alpha threshold value for all shaders after this one. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetBlendingMode | ( | BLENDING_MODE & | oBlend, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the state shader blending mode.
Parameters:
oBlend: | The blending mode for the shader. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetBlendingMode | ( | BLENDING_MODE & | oBlend, |
BLENDING_FUNCTION & | oFunction1, | ||
BLENDING_EQUATION & | oEquation, | ||
BLENDING_FUNCTION & | oFunction2, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the detailed state shader blending mode.
Parameters:
oBlend: | The blending mode for the shader. |
oFunction1: | Function applied to the incoming fragment color. |
oEquation: | Operation combining the two colors. |
oFunction2: | Function applied to the buffer fragment color. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetBlendingMode | ( | BLENDING_FUNCTION & | oFunction1, |
BLENDING_EQUATION & | oEquation, | ||
BLENDING_FUNCTION & | oFunction2, | ||
int | iNumBuffer, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the detailed state shader blending mode for a specified iNumBuffer.
Parameters:
oFunction1: | Function applied to the incoming fragment color. |
oEquation: | Operation combining the two colors. |
oFunction2: | Function applied to the buffer fragment color. |
iNumBuffer: | The number of the buffer being targeted in the VRL. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetColorMask | ( | bool & | oWriteR, |
bool & | oWriteG, | ||
bool & | oWriteB, | ||
bool & | oWriteA, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets the color masking mode.
Parameters:
oWriteR: | Authorized to write red color component? |
oWriteG: | Authorized to write green color component? |
oWriteB: | Authorized to write blue color component? |
oWriteA: | Authorized to write alpha color component? |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetDepthFunction | ( | FUNCTION & | oFunc, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the depth function.
Parameters:
oFunc: | The depth function for the shader. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetDepthMask | ( | DEPTH_MODE & | oMask, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the depth masking mode.
Parameters:
oMask: | The depth masking mode for the shader. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetDepthTest | ( | DEPTH_MODE & | oDepth, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the depth testing mode.
Parameters:
oDepth: | The depth testing mode for the shader. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetDisplacement | ( | float & | oDispHeight, |
RED::Object *& | oDispTexture, | ||
RED::Matrix & | oDispMatrix, | ||
RED::MESH_CHANNEL & | oDispUV, | ||
float & | oDispOffset, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Retrieves the displacement mapping parameters.
Parameters:
oDispHeight: | Maximal displacement height in model units. |
oDispMatrix: | Displacement texture matrix. |
oDispTexture: | Displacement texture. |
oDispUV: | Displacement UV channel. |
oDispOffset: | Displacement offset translation. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetDoubleSided | ( | bool & | oDoubleSided, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Should the rendering be double sided?
Parameters:
oDoubleSided: | true if we are double sided. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetFaceCulling | ( | CULLING_MODE & | oCullMode, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets the face culling mode.
Parameters:
oCullMode: | Face culling mode. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetLineSmoothing | ( | bool & | oOnOff, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets the line smoothing activation status.
Parameters:
oOnOff: | Is line smoothing enabled ? |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetLineStipple | ( | bool & | oOnOff, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets line stipple activation status.
Parameters:
oOnOff: | Is line stipple enabled ? |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetLineStipplePattern | ( | int & | oFactor, |
short & | oPattern, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets the line stipple parameters.
Parameters:
oFactor: | Line stipple factor. This is the scaling applied to the line stipple pattern. |
oPattern: | Line stipple pattern. This is a mask of 16 bits that define the line pattern used to draw lines. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetLineWidth | ( | float & | oWidth, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets the pixel width of rendered lines.
Parameters:
oWidth: | Pixel width of lines. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetMatte | ( | bool & | oMatte, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets the matte mode (see SetMatte for details).
Parameters:
oMatte: | matte mode enabled? |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public virtual RED_RC RED::StateShader::GetOperationStream | ( | const RED::Object * | iCaller, |
RED::Vector< int > & | ioStream, | ||
RED::HARDWARE_PLATFORM | iPlatformID | ||
) | const |
Internal access to the operation stream of a shader.
Internal RED usage method. Writes down the shader stream.
Parameters:
iCaller: | Pointer to the method caller. |
ioStream: | Stream to write to. |
iPlatformID: | Target hardware platform identifier. |
Returns:
RED_ALLOC_FAILURE if an internal allocation did fail,
RED_FAIL otherwise.
Reimplements: RED::Shader::GetOperationStream.
public RED_RC RED::StateShader::GetPlatformList | ( | RED::Vector< RED::HARDWARE_PLATFORM > & | oPlatformList | ) const |
Gets the list of hardware platforms used by the shader.
This method fills a RED::Vector with the list of hardware platforms that are used by the shader.
Parameters:
oPlatformList: | The list of hardware platforms. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetPlatformsCount | ( | int & | oCount | ) const |
public RED_RC RED::StateShader::GetPointSize | ( | float & | oPointSize, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets the point size.
Parameters:
oPointSize: | Return the point size diameter. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetPointSmoothing | ( | bool & | oOnOff, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets the point smoothing activation status.
Parameters:
oOnOff: | Is point smoothing enabled ? |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetPolygonOffset | ( | bool & | oOnOff, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets the polygon offset activation status.
Parameters:
oOnOff: | Is polygon offset enabled ? |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetPolygonOffsetValue | ( | float & | oFactor, |
float & | oUnits, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets the polygon offset parameters.
Parameters:
oFactor: | Angular factor used in the polygon offset equation. |
oUnits: | Number of biasing units in the polygon offset equation. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetReflectiveCaustics | ( | bool & | oReflectiveCaustics, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the reflective caustics enabled status.
Parameters:
oReflectiveCaustics: | Reflective caustics enabled status. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::GetRefractiveCaustics | ( | bool & | oRefractiveCaustics, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the refractive enabled caustics status.
Parameters:
oRefractiveCaustics: | Are refractive caustics enabled? |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::GetStencilFunction | ( | FUNCTION & | oFunc, |
int & | oRef, | ||
int & | oMask, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the stencil function.
Parameters:
oFunc: | The stencil function set in this shader. |
oRef: | Reference value for the stencil test. |
oMask: | Bitwise AND mask for stencil test. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetStencilMask | ( | int & | oMask, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the stencil writemask.
Parameters:
oMask: | The stencil writemask. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetStencilOperation | ( | STENCIL_OPERATION & | oFailOp, |
STENCIL_OPERATION & | oZFailOp, | ||
STENCIL_OPERATION & | oZPassOp, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the stencil operations.
Parameters:
oFailOp: | Stencil operation that occurs when the stencil test fails. |
oZFailOp: | Stencil operation that occurs when the stencil test passes and the depth test fails. |
oZPassOp: | Stencil operation that occurs when the stencil test and the depth test passes. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetStencilTest | ( | STENCIL_MODE & | oStencil, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the stencil testing mode.
Parameters:
oStencil: | The stencil testing mode for the shader. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetTransparencyColor | ( | RED::Color & | oTransparColor, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Gets the color of the transparency.
Parameters:
oTransparColor: | Transparency color. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetTransparencyImage | ( | RED::Object ** | oImage, |
RED::MESH_CHANNEL & | oUVChannel, | ||
RED::Matrix & | oMatrix, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Retrieves transparency texture parameters.
Parameters:
oImage: | Address of the transparency / alpha texture if it exists. |
oUVChannel: | Mesh channel used to sample 'oImage'. |
oMatrix: | Texture matrix for 'oImage'. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public RED_RC RED::StateShader::GetTransparencyMode | ( | TRANSPARENCY_MODE & | oTransparency, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) | const |
Returns the kind of transparency we manage.
Parameters:
oTransparency: | The transparency mode for all shaders after this one in its rendering pass. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter.
public virtual RED_RC RED::StateShader::Save | ( | RED::IStream * | iStream, |
StreamingPolicy & | iPolicy, | ||
int | iState = -1 | ||
) | const |
Internal class streaming.
Parameters:
iStream: | The target stream. |
iPolicy: | The streaming policy. |
iState: | The written transaction number. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation has failed,
RED_FAIL otherwise.
Implements: RED::IChunkSaver::Save.
public RED_RC RED::StateShader::SetAlphaThreshold | ( | float | iAlphaThreshold, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines the alpha masking threshold.
This value is used to define the alpha masking ratio for alpha masked transparency.
See Alpha masking for details.
Parameters:
iAlphaThreshold: | New value [0.0f,1.0f]. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetBlendingConstant | ( | const RED::Color & | iConstant, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Sets the constant colors/alpha usable in the blending.
Sets the constant color that can be used in a blending equation, for functions using one of the following BLENDING_FUNCTIONs:
- CONSTANT_COLOR,
- ONE_MINUS_CONSTANT_COLOR,
- CONSTANT_ALPHA,
- ONE_MINUS_CONSTANT_ALPHA.
See Transparency and Blending for details on blending and transparency.
Parameters:
iConstant: | Source and destination color constant. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetBlendingMode | ( | BLENDING_MODE | iBlendingMode, |
BLENDING_FUNCTION | iFunction1, | ||
BLENDING_EQUATION | iOperation, | ||
BLENDING_FUNCTION | iFunction2, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines the color blending mode.
Sets the blending mode for all incoming geometry. All parameters of the blending equation are set by this call.
See Transparency and Blending for details on blending and transparency.
Parameters:
iBlendingMode: | The blending mode to use. |
iFunction1: | Function applied to the incoming fragment color. |
iOperation: | Operation combining the two colors. |
iFunction2: | Function applied to the buffer fragment color. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetBlendingMode | ( | int | iNumBuffer, |
BLENDING_FUNCTION | iFunction1, | ||
BLENDING_EQUATION | iOperation, | ||
BLENDING_FUNCTION | iFunction2, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines the color blending mode for a single drawing buffer of a multiple render target VRL.
Requires blending to be activated using RED::StateShader::SetBlendingMode and the rendering to occur in a multiple render target VRL, created using RED::IWindow::CreateMultiRenderTargetVRL.
A first call to RED::StateShader::SetBlendingMode will turn on blending for all drawing buffers available in the VRL. Then, per buffer blending operations can be configured using this call.
See Transparency and Blending for details on blending and transparency.
Note that your hardware must support the ARB_draw_buffers_blend OpenGL extension, otherwise, the operation is ignored.
Parameters:
iNumBuffer: | The number of the buffer being targeted. |
iFunction1: | Function applied to the incoming fragment color. |
iOperation: | Operation combining the two colors. |
iFunction2: | Function applied to the buffer fragment color. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetBlendingMode | ( | BLENDING_MODE | iBlendingMode, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines the color blending mode.
Sets the blending mode for all incoming geometry. The RED::StateShader::SKIP blending mode indicates that the state shader will not interfere with the current blending parameters.
See Transparency and Blending for details on blending and transparency.
Parameters:
iBlendingMode: | The blending mode to use. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetColorMask | ( | bool | iWriteR, |
bool | iWriteG, | ||
bool | iWriteB, | ||
bool | iWriteA, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines the color write mode.
Parameters:
iWriteR: | Authorized to write red color component? |
iWriteG: | Authorized to write green color component? |
iWriteB: | Authorized to write blue color component? |
iWriteA: | Authorized to write alpha color component? |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation has failed.
public RED_RC RED::StateShader::SetDepthFunction | ( | FUNCTION | iFunc, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Specifies the depth function to use.
Depth testing must be enabled for this function to be effectively set.
Parameters:
iFunc: | The new depth test function. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetDepthMask | ( | DEPTH_MODE | iMask, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Specifies the depth masking (write) mode.
SKIP lets the previous state shader or pass startup mode unmodified.
Parameters:
iMask: | The new depth write mode. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetDepthTest | ( | DEPTH_MODE | iTest, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Specifies the depth testing mode.
SKIP lets the previous state shader or pass startup mode unmodified.
Note that in standard OpenGL if the depth test is disabled, then there won't be any depth write that will occur, even if the depth mask is enabled.
Parameters:
iTest: | The new depth test mode. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetDisplacement | ( | float | iDispHeight, |
const RED::Object * | iDispTexture, | ||
const RED::Matrix & | iDispMatrix, | ||
RED::MESH_CHANNEL | iDispUV, | ||
float | iDispOffset, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines a displacement map for the rendering of the object.
Defines a displacement map for the object. A displacement map is used to define a surface elevation at each texel on the rendered geometry. Texel triangles are created in a transient manner during the rendering to increase the detail of rendered geometries.
The height of the displacement map is the .x coordinate read from the texture map. The displacement map must be a RED::TGT_TEX_2D texture. The RED::FMT_L8 is best to use for the texture storage.
Displacement mapping can be removed by calling SetDisplacement with NULL as displacement texture.
Displacement mapping can be enabled or disabled for the ray-tracer by setting the wished RED::OPTIONS_RAY_DISPLACEMENT value.
Displacement mapping is ignored in hardware rendering.
See Adding displacement mapping to a material for a displacement mapping example.
Parameters:
iDispHeight: | Maximal height of the displacement in model units. This value must be positive. To have a displacement "below" the displaced surface, please use a negative 'iDispOffset' value and a positive 'iDispHeight'. |
iDispTexture: | Displacement texture. Must be a valid 2D image or NULL to disable displacement. |
iDispMatrix: | Displacement texture matrix. |
iDispUV: | UV channel to use to sample the displacement texture. Must be in the [ RED::MCL_TEX0, RED::MCL_TEX7 ] range. |
iDispOffset: | Displacement offset. This is a global translation of the displacement region. Setting a negative offset value for example equal to 'iDispHeight' generates a displacement surface that appears below the actual original surface level. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation has failed.
public RED_RC RED::StateShader::SetDoubleSided | ( | bool | iDoubleSided, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Renders the geometry once or twice.
Renders the geometry once if iDoubleSided is false, and renders the geometry twice if iDoubleSided is true. The polygon facing reference RED::RenderShaderParameter::REF_POLYGON_FACING can be used to identify which object side is currently being rendered.
Parameters:
iDoubleSided: | Are we double sided ? |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetFaceCulling | ( | CULLING_MODE | iCullingMode, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Sets the face culling mode.
Sets the culling mode for all incoming geometries.
Parameters:
iCullingMode: | Face culling mode. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetLineSmoothing | ( | bool | iOnOff, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Enables or disables line smoothing.
Uses OpenGL line smoothing capabilities, improving the quality of thick lines being rendered with a line stipple pattern.
Parameters:
iOnOff: | Enable or disable line smoothing. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetLineStipple | ( | bool | iOnOff, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Enables or disables line stipple.
See Hidden lines removal: A real-time example for a practical example of line stipple.
Parameters:
iOnOff: | Enable or disable line stipple. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetLineStipplePattern | ( | int | iFactor, |
short | iPattern, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines the line stipple parameters.
See Hidden lines removal: A real-time example for a practical example of line stipple.
Parameters:
iFactor: | Line stipple factor. This is the scaling applied to the line stipple pattern. Input value is clamped to [1,256]. For example, using a factor of 3 repeats three times each bit equal to 1 defined in the pattern. |
iPattern: | Line stipple pattern. This is a mask of 16 bits that define the line pattern used to draw lines. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetLineWidth | ( | float | iWidth, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Specifies the pixel width of rendered lines.
Define the pixel width of rendered lines. Note that enabling engine anti-aliasing reduces the size of rendered lines because of the super sampling method used. When engine AA is enabled, it may be necessary to increase the specified line width.
The rendering of thick lines is supported by the GPU rendering but is not supported by the software ray-tracer. However, 1 pixel wide lines can be rendered by the software ray-tracer.
Parameters:
iWidth: | Pixel width of lines. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetMaskedTransparency | ( | const RED::Object * | iAlphaImage, |
RED::MESH_CHANNEL | iAlphaChannel, | ||
const RED::Matrix & | iAlphaMatrix, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines a mask based transparency.
See Alpha masking for details.
Parameters:
iAlphaImage: | Specify the address of the alpha masking texture. |
iAlphaChannel: | Mesh channel source of the UV for the alpha mapping transparency texture sampling. |
iAlphaMatrix: | Texture matrix for iAlphaImage. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetMatte | ( | bool | iMatte, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines the matte mode.
When a material has the matte mode set to true, it is considered as not being lit directly. Instead, it receives shadows cast by the other objects in the scene as well as their global illumination contribution.
Matte objects are useful when rendering synthetic objects into real-world photographs for example.
Parameters:
iMatte: | Enable (true) or disable (false) matte mode. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation has failed.
public RED_RC RED::StateShader::SetNoTransparency | ( | RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ) |
Indicates that we are not transparent at all.
This is the default of a state shader.
Parameters:
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetPointSize | ( | float | iSize, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines the point size.
Define the OpenGL point size. This is the diameter of the point size.
Parameters:
iSize: | Diameter of rendered points. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetPointSmoothing | ( | bool | iOnOff, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Enables or disables point smoothing.
Uses OpenGL point smoothing capabilities, improving the quality of points being rendered with a point size greater than 1. If activated, points are rendered round instead of square.
Parameters:
iOnOff: | Enable or disable point smoothing. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetPolygonOffset | ( | bool | iOnOff, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Enables or disables polygon offset.
Only triangle based data may be depth offseted using the polygon offset. Other primitives may not be offseted.
The polygon offset is useful to avoid geometry stitching artifacts and is widely used to prevent edges of a mesh to be z-fighting with the geometry they represent.
Parameters:
iOnOff: | Enable or disable polygon offset. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetPolygonOffsetValue | ( | float | iFactor, |
float | iUnits, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines the polygon offset parameters.
The polygon offset is useful to avoid geometry stitching artifacts and is widely used to prevent edges of a mesh to be z-fighting with the geometry they represent.
Usually, 'iFactor' starts at 1.0 and is below 10.0; 'iUnits' starts at 1.0 and may be up to 100.0+ depending on the viewing conditions.
Parameters:
iFactor: | Angular factor used in the polygon offset equation. |
iUnits: | Number of biasing units in the polygon offset equation. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetReflectiveCaustics | ( | bool | iReflectiveCaustics, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Enables/disables reflective caustics.
True to enable the generation of reflective caustics.
Parameters:
iReflectiveCaustics: | Are reflective caustics enabled? |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetRefractiveCaustics | ( | bool | iRefractiveCaustics, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Enables/disables refractive caustics.
True to enable the generation of refractive caustics.
Parameters:
iRefractiveCaustics: | Are refractive caustics enabled? |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetSortedAndMaskedTransparency | ( | const RED::Object * | iOpacityTexture, |
RED::MESH_CHANNEL | iOpacityUV, | ||
const RED::Matrix & | iOpacityMatrix, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines a depth sorted transparency with an alpha mask.
We use an opacity texture in this configuration. The texture's color is used as the opacity color, and the texture's alpha is used as alpha mask for the rendering.
Parameters:
iOpacityTexture: | Opacity texture. |
iOpacityUV: | UV channel to use to sample the opacity texture. |
iOpacityMatrix: | Opacity texture matrix. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetSortedTransparency | ( | const RED::Color & | iOpacityColor, |
const RED::Object * | iOpacityTexture, | ||
RED::MESH_CHANNEL | iOpacityUV, | ||
const RED::Matrix & | iOpacityMatrix, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines a per pixel depth sorted transparency.
We may use an opacity color or an opacity texture in this configuration. We are not alpha masked by the texture's alpha values.
See also Improving CAD graphics.
Parameters:
iOpacityColor: | Opacity color. |
iOpacityTexture: | Opacity texture. Overrides iOpacityColor when set. |
iOpacityUV: | UV channel to use if we have a, opacity texture. |
iOpacityMatrix: | Opacity texture matrix. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation has failed.
public RED_RC RED::StateShader::SetSortedTransparency | ( | const RED::Color & | iOpacityColor, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines a per pixel depth sorted transparency.
We may use an opacity color here. This call is equivalent to setting a sorted transparency without texture using:
RED::StateShader::SetSortedTransparency( iOpacityColor,
NULL,
RED::MCL_TEX0,
RED::Matrix::IDENTITY,
iPlatformID );
Parameters:
iOpacityColor: | Opacity color. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation has failed.
public RED_RC RED::StateShader::SetStencilFunction | ( | FUNCTION | iFunc, |
int | iRef, | ||
int | iMask, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines the stencil function.
Defines the standard OpenGL stencil test: ( iRef & iMask ) iFunc ( stencil_buffer & iMask ) See No stencil buffer on auxiliary VRLs for details on using stencil buffer on various hardware.
Parameters:
iFunc: | The new stencil test function. |
iRef: | Reference value for the stencil test. |
iMask: | Bitwise AND mask for stencil test. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation has failed.
public RED_RC RED::StateShader::SetStencilMask | ( | int | iMask, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Specifies the stencil writemask value.
See No stencil buffer on auxiliary VRLs for details on using stencil buffer on various hardware.
Parameters:
iMask: | The new stencil mask value. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation did fail.
public RED_RC RED::StateShader::SetStencilOperation | ( | STENCIL_OPERATION | iFailOp, |
STENCIL_OPERATION | iZFailOp, | ||
STENCIL_OPERATION | iZPassOp, | ||
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Defines all stencil operations.
See No stencil buffer on auxiliary VRLs for details on using stencil buffer on various hardware.
Parameters:
iFailOp: | Stencil operation that occurs when the stencil test fails. |
iZFailOp: | Stencil operation that occurs when the stencil test passes and the depth test fails. |
iZPassOp: | Stencil operation that occurs when the stencil test and the depth test passes. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation has failed.
public RED_RC RED::StateShader::SetStencilTest | ( | STENCIL_MODE | iTest, |
RED::HARDWARE_PLATFORM | iPlatformID = RED::HW_GENERIC | ||
) |
Enables or disables stencil testing.
RED::StateShader::STENCIL_OFF is the default. See No stencil buffer on auxiliary VRLs for details on using stencil buffer on various hardware.
Parameters:
iTest: | Specify the stencil test mode. |
iPlatformID: | Platform identifier. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation has failed.
public RED_RC RED::StateShader::Solve | ( | RED::IReferenceManager * | iReferenceManager, |
const RED::State & | iState | ||
) |
Shader texture reference solving.
Parameters:
iReferenceManager: | Reference repository. |
iState: | Current transaction parameter. |
public virtual RED_RC RED::StateShader::UpdateFrom | ( | const RED::Object & | iShader, |
const RED::State & | iState, | ||
int | iSrcStateNumber | ||
) |
Internal update event method.
Parameters:
iShader: | Source shader. |
iState: | Current transaction parameter. |
iSrcStateNumber: | Source state number. |
Returns:
RED_BAD_PARAM if the method has received an invalid parameter,
RED_ALLOC_FAILURE if an internal allocation has failed,
RED_FAIL otherwise.
Implements: RED::Shader::UpdateFrom.
protected const RED::StateShaderPlatformData * RED::StateShader::FindPlatformData | ( | RED::HARDWARE_PLATFORM | iPlatformID | ) const |
Lookup for a given hardware platform data.
Parameters:
iPlatformID: | Identifier of the platform to lookup. |
Returns:
protected RED::StateShaderPlatformData & RED::StateShader::GetPlatformData | ( | RED_RC & | oRC, |
RED::HARDWARE_PLATFORM | iPlatformID | ||
) |
Lookup for a given hardware platform data.
This method will create a hardare platform data for iPlatformID if we have no match. The created platform data is initialized using any more generic platform found in the class.
Parameters:
oRC: | RED_OK if the operation has succeeded, RED_ALLOC_FAILURE if an internal allocation has failed. |
iPlatformID: | Identifier of the platform to lookup. |
Returns:
protected RED::StateShaderPlatformData * RED::StateShader::PlatformLookup | ( | RED::HARDWARE_PLATFORM | iPlatformID, |
bool | iExactMatch | ||
) | const |
Looks for a given hardware platform data.
This method uses the hierarchical runtime platform lookup: it'll search for data that exactly match iPlatformID and then it'll try a generic platform research in case of failure, unless iExactMatch is set to true, in which case the search stops if the exact platform is not found.
Parameters:
iPlatformID: | Identifier of the platform for the research. |
iExactMatch: | If true, the exact value of 'iPlatformId' is searched for, if false, the runtime platform hierarchy is used to look for a hardware compatible platform instead. |
Returns:
Variables documentation
Per platform contents.
Enumerations documentation
Lists all possible blending operations mixing the incoming fragment color and the destination fragment color.
Enumerator:
ADD | color = src_color + dest_color. |
SUBTRACT | color = src_color - dest_color. |
REVERSE_SUBTRACT | color = dest_color - src_color. |
MIN | color = min( src_color, dest_color ). |
MAX | color = max( src_color, dest_color ). |
EQ_ENUM_SIZE | Size of this enumeration. |
Lists all functions that can apply to the source or destination colors in the blending equation. The blending formula is always 'func1(src_color) operation func2(dest_color)'.
Enumerator:
Select the blending mode for all incoming geometries.
Enumerator:
SKIP | Means that we do not affect the current blending statement. |
NO_BLENDING | |
ADDITIVE | color = (src_color * src_alpha) + (dest_color * (1 - src_alpha)). |
SUBTRACTIVE | color = (src_color * src_alpha) - (dest_color * (1 - src_alpha)). |
MULTIPLICATIVE | color = src_color * dest_color. |
CUSTOM | color = function1( src_color ) operand function2( dest_color ). |
Select the side of a triangle that is to be visible during the rendering: BACK or FRONT. To render both faces of a polygon, use NONE.
Enumerator:
BACK | Culls back faces of the rendered geometry. |
FRONT | Culls front faces of the rendered geometry. |
NONE | Culls neither front nor back faces of the rendered geometry. |
Enable or disable z testing or writing.
Enumerator:
DEPTH_SKIP | Let the current depth testing or writing mode unchanged (default). |
ON | Enable depth testing using the specified depth comparison function or enable depth writing. |
OFF | Disable depth testing or writing. |
Enumeration of a depth or stencil test function.
Enumerator:
NEVER | Never pass the depth or stencil test for any fragment. |
LESS | Pass the depth or stencil test if the incoming fragment's depth is less than the current buffer depth or stencil at the fragment's coordinates. |
LEQUAL | Pass the depth or stencil test if the incoming fragment's depth is less than or equal to the current buffer depth or stencil at the fragment's coordinates. |
GREATER | Pass the depth or stencil test if the incoming fragment's depth is greater than the current buffer depth or stencil at the fragment's coordinates. |
GEQUAL | Pass the depth or stencil test if the incoming fragment's depth is greater than or equal to the current buffer depth or stencil at the fragment's coordinates. |
EQUAL | Pass the depth or stencil test if the incoming fragment's depth is equal to the current buffer depth or stencil at the fragment's coordinates. |
NOTEQUAL | Pass the depth or stencil test if the incoming fragment's depth is not equal to the current buffer depth or stencil at the fragment's coordinates. |
ALWAYS | Always pass the depth or stencil test for any fragment (default). |
Enable or disable stencil testing.
Enumerator:
STENCIL_ON | Enable stencil testing. |
STENCIL_OFF | Disable stencil testing. |
Lists all possible stencil operations.
Enumerator:
STENCIL_OP_KEEP | Stencil operation. Keep existing stencil value unchanged. |
STENCIL_OP_ZERO | Stencil operation. Set stencil value to zero. |
STENCIL_OP_REPLACE | Stencil operation. Replace stencil value by incoming stencil value. |
STENCIL_OP_INCR | Stencil operation. Increment stencil buffer by 1. |
STENCIL_OP_DECR | Stencil operation. Decrement stencil buffer by 1. |
STENCIL_OP_INVERT | Stencil operation. Invert bits in stencil buffer values. |
Select the kind of transparency we should use for the shader.
Enumerator:
NO_TRANSPARENCY | The name says it. |
MASKED_TRANSPARENCY | This is a fake transparency. The texture specified in RED::StateShader::SetMaskedTransparency is used as a filter for the fragments to render. There's no blending at all as the transparency result is a binary 0 / 1 value. Ray-traced shadows are defined by the masking texture's alpha intensity. |
SORTED_TRANSPARENCY | Blended transparency. The color or transparency texture is specified by RED::StateShader::SetSortedTransparency. Ray-traced shadows are defined by the color of the transparency, or by the texture's color modulated by the texture's alpha. |
SORTED_AND_MASKED_TRANSPARENCY | The texture's alpha value is used to mask the pixel regions where the fragments are rendered. This combines both transparency modes, using the single texture specified with RED::StateShader::SetSortedAndMaskedTransparency. Ray-traced shadows are computed as for the RED::StateShader::SORTED_TRANSPARENCY mode. |