User Tools

Site Tools


gamedev:textureproperties:texcoord_clamp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
gamedev:textureproperties:texcoord_clamp [2019/05/09 08:39] – removed dragonlordgamedev:textureproperties:texcoord_clamp [2019/05/09 08:39] – created dragonlord
Line 1: Line 1:
 +{{tag>graphic skin texture}}
 +<WRAP youarehere>
 +[[:start|Start Page]] >> [[gamedev:main|Game Development with the Drag[en]gine]] >> [[gamedev:skinproperties|Skin Texture Properties]] >> [[gamedev:texturepropertylist|Texture Property Database]] >> **texcoord.clamp**
 +</WRAP>
  
 +====== Skin Texture Property: texcoord.clamp ======
 +
 +Defines if the texture coordinates are clamped to the border.
 +
 +|Excepted Data Source|1 component value|
 +|Data Range|0(no clamp) 1(clamp to border)|
 +|Default Value|0|
 +|Affected Modules|Graphic|
 +|Linked Properties|-|
 +
 +====== Description ======
 +
 +The **texcoord.clamp** texture property defines if texture coordinates are clamped to the range from 0 to 1 in all directions instead of being wrapped around. World materials are typically tileable seamless. For these materials the texture coordinates have to wrap around to ensure seamless tiling. In this case this texture property has to be disabled which is the default. Single object materials or unique materials on the other hand tend to have textures where wrapping around causes artifacts or look wrong. This can happen if a texture is rotated for example a ventilation fan. Without clamping the texture coordinates to the image border the fan would incorrectly repeat in the corners while rotating the texture coordinates. Using this texture property this repetition behavior can be prevented. Clamping restricts the texture coordinates to the range from 0 to 1 for all texture coordinate axes. This repeats the border pixels of the image outside the clamped area. Ensure the pixels around the image border are properly adjusted for this case. To use the fan example again if the border pixels are not all transparent the fan texture would smear out along the borders instead of clamping off correctly. As a rule of thumb leave a border of 2 pixels empty around clamped images with transparency. Without transparency you can go use up all pixels up to the border.
 +
 +The source is typically a single component value with 0 for no clamping or 1 for clamping to the border.
 +
 +The default value for this texture property is 0 (no clamping).
 +
 +====== Examples ======
 +
 +( TODO: example image )
gamedev/textureproperties/texcoord_clamp.txt · Last modified: 2019/05/24 23:43 by dragonlord