Texture Address

Introduction

The texture address property controls the texture address behavior of a sprite. Specifically it can control whether texture addresses variables are available, and how texture coordinates and sprite size relate.

Entire Texture

If the texture address property is set to EntireTexture then the sprite will draw its full image. The sprite will not repeat this texture or render only part of the texture.

Custom

If the texture address property is set to Custom then the top, bottom, left, and right properties can be independently set. This allows a sprite to only render a portion of its source texture.

Typically a Texture Address of Custom is used in combination with a Width Units of Percent of File Width and and a Height Units of Percent of File Height. In this case, the size of the sprite depends on the texture coordinates.

DimensionsBased

If the Texture Address property is set to DimensionsBased then the texture coordinates will adjust internally according to the width and the height of the Sprite. In other words, making the sprite larger or smaller will not stretch the image that it is rendering. Instead the image will be clipped, or clamped/wrapped according to the Wrap property.

Wrap

Combining the DimensionsBased texture address with the wrap property will let you easily create tiling sprites.

Last updated