Table of Contents

, ,

Start Page » Game Development with the Drag[en]gine » Skin Texture Properties » Texture Property Database » texcoord.clamp

Skin Texture Property: texcoord.clamp

Defines if the texture coordinates are clamped to the border.

Excepted Data Source1 component value
Data Range0(no clamp) 1(clamp to border)
Default Value0
Affected ModulesGraphic
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 )