Execute (Realtime Shaders)


Description

This callback is the main entry point for rendering the realtime shader.

Once the shader has responded to GetAttributeList with its list of attributes, Softimage will package the values for these attributes and will pass them to the Execute function along with an array describing each attribute's size and format. Note that if an attribute was not found or was not defined on the mesh or point cloud, Softimage will pass a null pointer.

Note This callback is mandatory.


Applies To

Custom Realtime Shaders


Syntax

bool <shader_name>_<renderer_name>_Execute (

	CRef 	in_pCtx, 

	void 	**io_pInstanceData

)

{ 

	... 

}

<shader_name> is the class name registered for this shader, with any spaces converted to underscores. In the case of a shader definition plug-in, the name is specified in the call to PluginRegistrar::RegisterShader. In the case of a shader definition created with a parser, the name is set in the ParseInfo callback via the ClassName attribute.

<renderer_name> is the name of the rendering engine. For example, an OpenGL shader with a class name of Sunset will use Sunset_OpenGL_Execute, whereas the version parsed from a .cgfx file will use Sunset_CgFx_Execute.


Parameters

Parameter Type Description
in_pCtx CRef& A reference to the HardwareShaderContext object.
io_pInstanceData void A pointer to the shader instance user data


See Also