|
|
|
|
Reference: Muli3D: IMuli3DPixelShader Class Reference
IMuli3DPixelShader Class Reference#include <m3dcore_shaders.h>
Inheritance diagram for IMuli3DPixelShader:
List of all members.
Detailed Description
Defines the pixel shader interface.
Member Function Documentation
virtual bool IMuli3DPixelShader::bExecute |
( |
const shaderreg * |
i_pInput, |
|
|
vector4 & |
io_vColor, |
|
|
float32 & |
io_fDepth |
|
) |
[protected, pure virtual] |
|
|
Accessible by CMuli3DDevice. This is the core function of a pixel shader: It receives interpolated register data from the vertex shader and can output a new color and depth value for the pixel currently being drawn. - Parameters:
-
[in] | i_pInput | pixel shader input registers, which have been set up in the vertex shader and interpolated during rasterization. |
[in,out] | io_vColor | contains the value of the pixel in the rendertarget when Execute() is called. The pixel shader may perform blending with this value and setting it to a new color. Make sure to override GetShaderOutput() to the correct shader type. |
[in,out] | io_fDepth | contains the depth of the pixel in the rendertarget when Execute() is called. The pixel shader may set this to a new value. Make sure to override GetShaderOutput() to the correct shader type. |
- Returns:
- true if the pixel shall be written to the rendertarget, false in case it shall be killed.
|
virtual bool IMuli3DPixelShader::bMightKillPixels |
( |
|
) |
[inline, protected, virtual] |
|
|
Returns true incase support for pixel-killing for m3dpso_coloronly-shader-types shall be enabled.
|
void IMuli3DPixelShader::GetDerivatives |
( |
uint32 |
i_iRegister, |
|
|
vector4 & |
o_vDdx, |
|
|
vector4 & |
o_vDdy |
|
) |
const [protected] |
|
|
This functions computes the partial derivatives of a shader register with respect to the screen space coordinates. - Parameters:
-
[in] | i_iRegister | index of the source shader register. |
[out] | o_vDdx | partial derivative with respect to the x-screen space coordinate. |
[out] | o_vDdy | partial derivative with respect to the y-screen space coordinate. |
|
|
Accessible by CMuli3DDevice. Returns the type of the pixel shader; member of the enumeration m3dpixelshaderoutput. Default: m3dpso_coloronly.
|
|
Accessible by CMuli3D - Sets the triangle info. - Parameters:
-
[in] | i_pVSOutputs | pointer to the pixel shader input register-types. |
[in] | i_pTriangleInfo | pointer to the triangle info structure. |
|
|
|