The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Texture2D
Texture2D type (as it exists in Shader Model 4) plus resource variables. This texture object supports the following methods in addition to the methods in Shader Model 4.
| Method | Description |
|---|---|
| Gather | Samples a texture and returns all components. |
| GatherRed | Samples a texture and returns the red component. |
| GatherGreen | Samples a texture and returns the green component. |
| GatherBlue | Samples a texture and returns the blue component. |
| GatherAlpha | Samples a texture and returns the alpha component. |
| GatherCmp | Samples and compares a texture and returns all components. |
| GatherCmpRed | Samples and compares a texture and returns the red component. |
| GatherCmpGreen | Samples and compares a texture and returns the green component. |
| GatherCmpBlue | Samples and compares a texture and returns the blue component. |
| GatherCmpAlpha | Samples and compares a texture and returns the alpha component. |
| GetDimensions | Gets the resource dimensions. |
| Load | Reads texture data. |
| mips.Operator[][] | Gets a read-only resource variable. |
| Operator[] | Gets a read-only resource variable. |
| Sample | Samples a texture. |
| SampleBias | Samples a texture, after applying the bias value to the mipmap level. |
| SampleCmp | Samples a texture, using a comparison value to reject samples. |
| SampleCmpLevelZero | Samples a texture (mipmap level 0 only), using a comparison value to reject samples. |
| SampleGrad | Samples a texture using a gradient to influence the way the sample location is calculated. |
| SampleLevel | Samples a texture on the specified mipmap level. |
Minimum Shader Model
This object is supported in the following shader models.
| Shader Model | Supported |
|---|---|
| Shader Model 5 and higher shader models | yes |
This object is supported for the following types of shaders:
| Vertex | Hull | Domain | Geometry | Pixel | Compute |
|---|---|---|---|---|---|
| x | x | x | x | x | x |
See also
Show: