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
Next revision
Previous revision
gamedev:textureproperties:texcoord_clamp [2019/05/08 22:52] dragonlordgamedev:textureproperties:texcoord_clamp [2019/05/24 23:43] (current) – ↷ Links adapted because of a move operation dragonlord
Line 1: Line 1:
-~~Title: Skin Texture Property: texcoord.clamp~~ 
 {{tag>graphic skin texture}} {{tag>graphic skin texture}}
 <WRAP youarehere> <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**+[[:start|Start Page]] >> [[:gamedev|Game Development with the Drag[en]gine]] >> [[gamedev:skinproperties|Skin Texture Properties]] >> [[gamedev:texturepropertylist|Texture Property Database]] >> **texcoord.clamp**
 </WRAP> </WRAP>
  
-<WRAP boxheader> +====== Skin Texture Property: texcoord.clamp ====== 
-====== Summary ====== + 
-</WRAP> +Defines if the texture coordinates are clamped to the border
-<WRAP boxcontent> +
-|Texture Property Name|texcoord.clamp| +
-|Description|Defines if the texture coordinates are clamped to the border|+
 |Excepted Data Source|1 component value| |Excepted Data Source|1 component value|
 |Data Range|0(no clamp) 1(clamp to border)| |Data Range|0(no clamp) 1(clamp to border)|
Line 16: Line 13:
 |Affected Modules|Graphic| |Affected Modules|Graphic|
 |Linked Properties|-| |Linked Properties|-|
-</WRAP> 
  
 ====== Description ====== ====== 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 **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.
  
Line 26: Line 23:
  
 ====== Examples ====== ====== Examples ======
 +
 ( TODO: example image ) ( TODO: example image )
gamedev/textureproperties/texcoord_clamp.1557355932.txt.gz · Last modified: 2019/05/08 22:52 by dragonlord