Sampler Type Syntax
Microsoft DirectX 9.0 SDK Update (October 2004)

Sampler Type Syntax


Syntax

sampler SamplerName[Array_Index] [= Initializers];

where:

samplerThe sampler keyword must appear here.
SamplerName[Array_Index]An ASCII string that uniquely identifies the name of a variable within a shader. Each variable can be defined as a single variable or optionally as an array of variables. Array_Index is the optional array size and is specified as a positive integer greater than or equal to 1.
InitializersInitializers specify default sampler state. Initializers are optional. If initializers are used, they must appear within a statement block (delimited by {}) with the sampler_state keyword as shown here:
= sampler_state 
{ 
  ...; // sampling state
  ...; // sampling state
};

Remarks

This sampler is initialized with linear filtering.

sampler s = sampler_state 
{ 
  texture = NULL; 
  mipfilter = LINEAR; 
};


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.