Syntax

Result = dbLoadEffect(Filename.s, EffectID, TextureFlag [, DoNotGenerateExtraData])

Description

This command will load an FX file.

If #PB_Any is used as the EffectID parameter, the new ID will be returned as 'Result'. Otherwise the value of 'Result' is the same value passed as the EffectID parameter.

Filename

The FX filename must point to an FX file that is compatible with the DX9 effect framework and would typically use the extension '.fx'.

 

EffectID

The FX can be stored and referred to by a number that identifies it. You can use this number to apply an effect to an object previously loaded.

 

TextureFlag

If the Texture Flag is set to zero, the effect will use the textures already mapped to the model, and a value of one will discard the current textures and load the textures specified in the FX file. Typically, effects rely on the specified model and textures in the FX file to function properly.

 

DoNotGenerateExtraData

Set this value to one to avoid generating tangent and binormal data, and set the value to two to additionally strip out any secondary UV data, sometimes needed to allow a complex shader to create a valid declaration.

See Also

dbDeleteEffect, dbEffectExist, dbSetLimbEffect, dbSetObjectEffect