mesh.TexCoord
From GMod Wiki
Function | |
Syntax |
mesh.TexCoord( Integer stage, Number u, Number v ) Where is this used? |
Description: | |
Defines the texture coordinates for the current vertex. | |
Returns: | nil |
Part of Library: | mesh |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Mesh.TexCoord]Mesh.TexCoord [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | N/A | ||
---|---|---|---|
Used on | |||
Code |
| ||
Output | N/A |
Additional Notes
- Texture coordinates tell the renderer what part of the material the current vertex is associated with.
- There are many different types of texture maps; spherical, cubical, etc.
- Stage should always be 0 unless your shader for the material requires two sets of texture coordinates.
- U and V coordinates range from 0 to 1, with the coordinates (0,0) being at the top-left of an image, and (1,1) being at the bottom right.