DxSetShaderTessellation: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(add oop syntax)
(Added needs checking template in order to encourage people to write a better example)
Line 1: Line 1:
{{Client function}}
{{Client function}}
__NOTOC__
__NOTOC__
{{Needs checking|The example should depict better how does this function actually work with a texture.}}
This function sets the amount of geometric sub-division to use when drawing a [[shader]] element with [[dxDrawImage]].
This function sets the amount of geometric sub-division to use when drawing a [[shader]] element with [[dxDrawImage]].



Revision as of 11:30, 16 January 2016

Template:Needs checking 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 )

OOP Syntax Help! I don't understand this!

Method: shader:setTessellation(...)


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

This template will be deleted.

See Also