EngineApplyShaderToWorldTexture: Difference between revisions
Jump to navigation
Jump to search
m (moved EngineApplyShaderToModel to EngineApplyShaderToWorldTexture: Function changed) |
No edit summary |
||
Line 4: | Line 4: | ||
Only available in 1.1 | Only available in 1.1 | ||
}} | }} | ||
This function applies a [[shader]] to one | This function applies a [[shader]] to one or more world textures. The shader inherits the render states of the original when it is drawn, so texture stage 0 will already be set to the original texture. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool | bool engineApplyShaderToWorldTexture ( element shader, string textureName ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''shader:''' The shader which is to be applied | *'''shader:''' The shader which is to be applied | ||
*'''textureName :''' The name of the world texture to apply the shader to. Wildcard matching e.g. "ro?ds*" can be used to apply to more than one texture at a time. | |||
*'''textureName :''' The name of the texture | |||
===Returns=== | ===Returns=== | ||
Returns ''true'' if the shader was successfully applied | Returns ''true'' if the shader was successfully applied, ''false'' otherwise. | ||
==Example== | ==Example== | ||
This example will apply a shader to the "des_logwall" texture | This example will apply a shader to the "des_logwall" world texture (which is used by the house near the 'play' gamemode spawn point) | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
myShader = dxCreateShader( "hello.fx" ) | myShader = dxCreateShader( "hello.fx" ) | ||
engineApplyShaderToWorldTexture( myShader, "des_logwall" ) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 19:02, 20 July 2011
Only available in 1.1 This function applies a shader to one or more world textures. The shader inherits the render states of the original when it is drawn, so texture stage 0 will already be set to the original texture.
Syntax
bool engineApplyShaderToWorldTexture ( element shader, string textureName )
Required Arguments
- shader: The shader which is to be applied
- textureName : The name of the world texture to apply the shader to. Wildcard matching e.g. "ro?ds*" can be used to apply to more than one texture at a time.
Returns
Returns true if the shader was successfully applied, false otherwise.
Example
This example will apply a shader to the "des_logwall" world texture (which is used by the house near the 'play' gamemode spawn point)
myShader = dxCreateShader( "hello.fx" ) engineApplyShaderToWorldTexture( myShader, "des_logwall" )
See Also
- engineAddImage
- engineApplyShaderToWorldTexture
- engineFreeModel
- engineGetModelFlags
- engineGetModelIDFromName
- engineGetModelLODDistance
- engineGetModelNameFromID
- engineGetModelPhysicalPropertiesGroup
- engineGetModelTextureNames
- engineGetModelTextures
- engineGetModelTXDID
- engineGetModelVisibleTime
- engineGetObjectGroupPhysicalProperty
- engineGetSurfaceProperties
- engineGetVisibleTextureNames
- engineImageGetFilesCount
- engineImageGetFiles
- engineImageGetFile
- engineImageLinkDFF
- engineImageLinkTXD
- engineImportTXD
- engineLoadCOL
- engineLoadDFF
- engineLoadIMG
- engineLoadIFP
- engineLoadTXD
- engineRemoveImage
- engineRemoveShaderFromWorldTexture
- engineReplaceAnimation
- engineReplaceCOL
- engineReplaceModel
- engineRequestModel
- engineResetModelFlags
- engineResetModelLODDistance
- engineResetSurfaceProperties
- engineRestoreAnimation
- engineRestoreCOL
- engineRestoreDFFImage
- engineRestoreModel
- engineRestoreModelPhysicalPropertiesGroup
- engineRestoreObjectGroupPhysicalProperties
- engineRestoreTXDImage
- engineRestreamWorld
- engineSetAsynchronousLoading
- engineSetModelFlag
- engineSetModelFlags
- engineSetModelLODDistance
- engineSetModelPhysicalPropertiesGroup
- engineSetModelVisibleTime
- engineSetObjectGroupPhysicalProperty
- engineSetSurfaceProperties
- engineStreamingFreeUpMemory
- engineStreamingGetUsedMemory
- dxConvertPixels
- dxCreateFont
- dxCreateRenderTarget
- dxCreateScreenSource
- dxCreateShader
- dxCreateTexture
- dxDrawCircle
- dxDrawImage
- dxDrawImageSection
- dxDrawLine
- dxDrawLine3D
- dxDrawMaterialLine3D
- dxDrawMaterialPrimitive
- dxDrawMaterialPrimitive3D
- dxDrawMaterialSectionLine3D
- dxDrawPrimitive
- dxDrawPrimitive3D
- dxDrawRectangle
- dxDrawText
- dxDrawWiredSphere
- dxGetBlendMode
- dxGetFontHeight
- dxGetMaterialSize
- dxGetPixelColor
- dxGetPixelsSize
- dxGetPixelsFormat
- dxGetStatus
- dxGetTextSize
- dxGetTextWidth
- dxGetTexturePixels
- dxIsAspectRatioAdjustmentEnabled
- dxSetAspectRatioAdjustmentEnabled
- dxSetBlendMode
- dxSetPixelColor
- dxSetRenderTarget
- dxSetShaderValue
- dxSetShaderTessellation
- dxSetShaderTransform
- dxSetTestMode
- dxSetTextureEdge
- dxSetTexturePixels
- dxUpdateScreenSource