Class IDX8PixelShader

3DS Max Plug-In SDK

Class IDX8PixelShader

See Also: Class ID3DGraphicsWindow, Class IDX8VertexShader , Class BaseInterface, Class Material, Class INode

class IDX8PixelShader: public BaseInterface

Description:

This class is available in release 4.0 and later only.

The abstract interface to the Direct-3D Pixel Shader architecture.

Methods:

public:

Prototype:

virtual Interface_ID GetID();

Remarks:

This method returns the interface ID of the class.

Default Implementation:

{ return DX8_PIXEL_SHADER_INTERFACE_ID; }

Prototype:

virtual HRESULT ConfirmDevice(ID3DGraphicsWindow *gw) = 0;

Remarks:

This method will confirm that the Direct3D Device can handle this PixelShader.

Parameters:

ID3DGraphicsWindow *gw

A pointer to the Direct-3D Graphics Window.

Prototype:

virtual HRESULT ConfirmVertexShader(IDX8VertexShader *pvs) = 0;

Remarks:

This method will confirm that an associated VertexShader will work with this PixelShader.

Parameters:

IDX8VertexShader *pvs

A pointer to the vertex shader to check for.

Prototype:

virtual HRESULT Initialize(Material *mtl, INode *node) = 0;

Remarks:

This method will load the PixelShader instructions and textures. PixelShader instructions should be loaded once and shared among all the nodes using this PixelShader. In addition, any textures necessary for the PixelShader effect should be loaded once and shared among all the nodes using this PixelShader.

Parameters:

Material *mtl

A pointer to the pixel shader material.

INode *node

A pointer to the node.

Prototype:

virtual int GetNumMultiPass() = 0;

Remarks:

This method returns the number of passes for the effect this PixelShader creates. Note that this value will depend on the hardware currently in use.

Prototype:

virtual DWORD GetPixelShaderHandle(int numPass) = 0;

Remarks:

This method returns the PixelShader handle for the specified pass for use in GFX.

Parameters:

int numPass

The pass for which to return the pixelshader handle.

Prototype:

virtual HRESULT SetPixelShader(ID3DGraphicsWindow *gw, int numPass) = 0;

Remarks:

This method allows you to set the PixelShader for the specified pass. This call will be made at least once per object to set the per object data for the PixelShader such as the PixelShader constants.

Parameters:

ID3DGraphicsWindow *gw

A pointer to the Direct-3D Graphics Window.

int numPass

The pass for which to set the pixel shader.