?/TD>
Microsoft DirectX 9.0

texldl (Vertex Shader)


Sample a texture with a particular sampler. The particular mipmap level (LOD) being sampled has to be specified as the fourth component of the texture coordinate.

Syntax

texldl dst, src0, src1

Where:

Remarks

Vertex shader versions1_12_02_x2_sw3_03_sw
texldlxx

texldl looks up the texture set at the sampler stage referenced by src1. The level of detail (LOD) is selected from src0.w. This value can be negative, in which case the LOD selected is the "zero'th one" (biggest map) with the MAGFILTER. Because src0.w is a floating point value, the fractional value is used to interpolate (if MIPFILTER is LINEAR) between two mip levels. Sampler states MIPMAPLODBIAS and MAXMIPLEVEL are honored. For more information about sampler states, see D3DSAMPLERSTATETYPE.

If a shader program samples from a sampler that does not have a texture set, 0001 is obtained in the destination register.

The following rough algorithm has been provided for reference that the reference device follows.

LOD = src0.w + LODBIAS;
if (LOD <= 0 )
{
   LOD = 0;
   Filter = MagFilter;
   tex = Lookup( MAX(MAXMIPLEVEL, LOD), Filter );
}
else
{
   Filter = MinFilter;
   LOD = MAX( MAXMIPLEVEL, LOD);
   tex = Lookup( Floor(LOD), Filter );
   if( MipFilter == LINEAR )
   {
      tex1 = Lookup( Ceil(LOD), Filter );                        
      tex = (1 - frac(src0.w))*tex + frac(src0.w)*tex1;
   }
}

Restrictions:



© 2002 Microsoft Corporation. All rights reserved.