DxSetShaderTessellation: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool dxSetShaderTessellation ( element shader, int tessellationX, int tessellationY )
bool dxSetShaderTessellation ( element theShader, int tessellationX, int tessellationY )
</syntaxhighlight>  
</syntaxhighlight>  


===Required Arguments===  
===Required Arguments===  
*'''shader:''' The shader element whose tessellation is to be changed
*'''theShader:''' The shader element whose tessellation is to be changed
*'''tessellationX:''' The number of sub-division points along the X axis. Range is 1 to 500.
*'''tessellationX:''' The number of sub-division points along the X axis. Range is 1 to 500.
*'''tessellationY:''' The number of sub-division points along the Y axis. Range is 1 to 500.
*'''tessellationY:''' The number of sub-division points along the Y axis. Range is 1 to 500.

Revision as of 11:54, 26 January 2013

This function sets the amount of geometric sub-division to use when drawing a shader element with dxDrawImage.

Using tessellation allows a shader to manipulate the shape of the rendered image at each sub-division boundary.

Syntax

bool dxSetShaderTessellation ( element theShader, int tessellationX, int tessellationY )

Required Arguments

  • theShader: The shader element whose tessellation is to be changed
  • tessellationX: The number of sub-division points along the X axis. Range is 1 to 500.
  • tessellationY: The number of sub-division points along the Y axis. Range is 1 to 500.

Returns

Returns true if the shader element's tessellation was successfully changed, false otherwise.

Example

myShader = dxCreateShader( "hello.fx" )
dxSetShaderTessellation ( myShader, 16, 16 )

Requirements

Minimum server version n/a
Minimum client version 1.1.1-9.03316

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.1.1-9.03316" />

See Also