Caps.MaxTextureRepeat Property (Microsoft.DirectX.Direct3D)

Retrieves the maximum range of the integer bits for post-normalized texture coordinates.

Definition

Visual Basic Public ReadOnly Property MaxTextureRepeat As Integer
C# public int MaxTextureRepeat { get; }
C++ public:
property int MaxTextureRepeat {
        int get();
}
JScript public function get MaxTextureRepeat() : int

Property Value

System.Int32
An Int32Leave Site value that indicates the maximum range of the integer bits for the post-normalized texture coordinates.

This property is read-only. 

Remarks

A texture coordinate is stored as a 32-bit signed integer that uses 27 bits to store the integer and five bits to store the floating-point fraction. The maximum integer index, 227, is used to determine the maximum texture coordinate, depending on how the hardware performs texture-coordinate scaling.

Some hardware sets the Caps.TextureCaps.SupportsTextureRepeatNotScaledBySize capability to true. In this case, the device defers the scaling of texture coordinates by texture size until after interpolation and application of the texture address mode. This means that the number of times a texture can be wrapped is specified by the integer value in MaxTextureRepeat.

Other hardware sets the Caps.TextureCaps.SupportsTextureRepeatNotScaledBySize capability to false, and the device scales the texture coordinates by texture size (using the highest level of detail) before interpolation. This limits the number of times a texture can be wrapped to MaxTextureRepeat / texture size.

For example, assume that MaxTextureRepeat is equal to 32 KB, and the size of the texture is 4 KB. If the hardware sets Caps.TextureCaps.SupportsTextureRepeatNotScaledBySize to true, the number of times a texture can be wrapped is equal to MaxTextureRepeat, which is 32 KB. Otherwise, the number of times a texture can be wrapped is equal to MaxTextureRepeat divided by texture size, which is 227 / 4 KB.