DxSetShaderTessellation: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Client function}} __NOTOC__ {{New feature|3.0120|1.2| '''Available only in MTA SA 1.1.1 r3316 and onwards''' }} This set the amount of geometric sub-division when using a [[sh...") |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(9 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{Client function}} | {{Client function}} | ||
{{Needs Checking|The example should depict better how does this function actually work with a texture.}} | |||
__NOTOC__ | __NOTOC__ | ||
This function sets the amount of geometric sub-division to use when drawing a [[shader]] element with [[dxDrawImage]]. | |||
This | |||
Using tessellation allows a shader to manipulate the shape of the rendered image at each sub-division boundary. | Using tessellation allows a shader to manipulate the shape of the rendered image at each sub-division boundary. | ||
Line 10: | Line 8: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool dxSetShaderTessellation ( element | bool dxSetShaderTessellation ( element theShader, int tessellationX, int tessellationY ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[shader]]:setTessellation}} | |||
===Required Arguments=== | ===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. | *'''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. | ||
Line 26: | Line 25: | ||
dxSetShaderTessellation ( myShader, 16, 16 ) | dxSetShaderTessellation ( myShader, 16, 16 ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Drawing_functions}} | {{Drawing_functions}} | ||
[[hu:dxSetShaderTessellation]] |
Latest revision as of 15:34, 7 November 2024
This article needs checking. | |
Reason(s): 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.
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 )
See Also
- 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