Share via


TextureCaps.SupportsNonPower2Conditional Property (Microsoft.DirectX.Direct3D)

Specifies whether the device conditionally supports the use of 2-D textures with dimensions that are not powers of two.

Definition

Visual Basic Public ReadOnly Property SupportsNonPower2Conditional As Boolean
C# public bool SupportsNonPower2Conditional { get; }
C++ public:
property bool SupportsNonPower2Conditional {
        bool get();
}
JScript public function get SupportsNonPower2Conditional() : boolean

Property Value

System.Boolean
Value that is true if the device conditionally supports dimensions that are not powers of two, or false if it does not.

This property is read-only. 

Remarks

A device that exposes this capability can use a texture whose dimensions are not powers of two, provided all of the following requirements are met.

  • The texture-addressing mode for the texture stage is set to TextureAddress.Clamp.
  • Texture wrapping for the texture stage is disabled (that is, RenderStateManager.Wrap0 is set to 0).
  • Mipmapping is not in use (that is, only the magnification filter is in use).
  • Texture formats are not DXT1-5.

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, beml, or texm3x3 instructions in pixel shaders versions 1_0 to 1_3). For example, these textures can be used to store bumps that are fed into texture reads, but not the environment maps that are used in texbem, texbeml, or texm3x3spec. 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.