Share via


GraphicsDeviceCapabilities.TextureCaps.SupportsNonPower2Conditional Property

Gets a value indicating whether the device supports the use of 2D textures with dimensions that are not powers of two, under certain conditions.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public bool SupportsNonPower2Conditional { get; }

Property Value

true if the device supports the use of 2D textures with dimensions that are not powers of two, under certain conditions; false otherwise.

Remarks

The device can use a texture with dimensions that are not a power of two, as long as these conditions are met:

If this flag is not set, and .RequiresPower2 is also not set, then unconditional support is provided for 2D textures with dimensions that are not powers of two.

A texture that is not a power of two cannot be set at a stage that will be read based on a shader computation (such as the bem - ps and texm3x3 - ps instructions in pixel shaders versions 1_0 to 1_3). For example, these textures can be used to store bumps that will be fed into texture reads, but not the environment maps that are used in texbem - ps, texbeml - ps, and texm3x3spec - ps. This means that a texture with dimensions that are not powers of two cannot be addressed or sampled using texture coordinates computed within the shader. This type of operation is known as a dependent read and cannot be performed on these types of textures.

See Also

Reference

GraphicsDeviceCapabilities.TextureCaps Structure
GraphicsDeviceCapabilities.TextureCaps Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista