# C1.Util.DX.Direct3D11.CommonShaderStageBase.SetSamplers

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetSamplers_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetSamplers*">SetSamplers Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetSamplers_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetSamplers*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetSamplers_System_Int32_C1_Util_DX_Direct3D11_SamplerState___" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetSamplers(System.Int32,C1.Util.DX.Direct3D11.SamplerState[])">SetSamplers(int, params SamplerState[])</h4>
<div class="markdown level1 summary"><p>Sets an array of samplers to be used by the shader stage.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetSamplers(int slot, params SamplerState[] samplers)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetSamplers(slot As Integer, ParamArray samplers As SamplerState())</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">slot</span></td>
      <td><p>Index into the device's zero-based array to which to set the array of sampler states.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.SamplerState.html">SamplerState</a>[]</td>
      <td><span class="parametername">samplers</span></td>
      <td><p>An array of sampler state to set</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetSamplers_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetSamplers*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetSamplers_System_Int32_C1_Util_DX_ComArray_C1_Util_DX_Direct3D11_SamplerState__" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetSamplers(System.Int32,C1.Util.DX.ComArray{C1.Util.DX.Direct3D11.SamplerState})">SetSamplers(int, ComArray&lt;SamplerState&gt;)</h4>
<div class="markdown level1 summary"><p>Sets an array of samplers to be used by the shader stage.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetSamplers(int slot, ComArray&lt;SamplerState&gt; samplers)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetSamplers(slot As Integer, samplers As ComArray(Of SamplerState))</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">slot</span></td>
      <td><p>Index into the device's zero-based array to which  to set the array of sampler states.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.ComArray-1.html">ComArray</a>&lt;<a class="xref" href="C1.Util.DX.Direct3D11.SamplerState.html">SamplerState</a>&gt;</td>
      <td><span class="parametername">samplers</span></td>
      <td><p>An array of sampler state to set</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetSamplers_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetSamplers*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetSamplers_System_Int32_System_Int32_C1_Util_DX_Direct3D11_SamplerState___" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetSamplers(System.Int32,System.Int32,C1.Util.DX.Direct3D11.SamplerState[])">SetSamplers(int, int, params SamplerState[])</h4>
<div class="markdown level1 summary"><p>Set an array of sampler states to the shader pipeline stage.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetSamplers(int startSlot, int numSamplers, params SamplerState[] samplers)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetSamplers(startSlot As Integer, numSamplers As Integer, ParamArray samplers As SamplerState())</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">startSlot</span></td>
      <td><p>Index into the device's zero-based array to begin setting samplers to (ranges from 0 to D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">numSamplers</span></td>
      <td><p>Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.SamplerState.html">SamplerState</a>[]</td>
      <td><span class="parametername">samplers</span></td>
      <td><p>Pointer to an array of sampler-state interfaces (see <a class="xref" href="C1.Util.DX.Direct3D11.SamplerState.html">SamplerState</a>). See Remarks.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetSamplers_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetSamplers*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetSamplers_System_Int32_System_Int32_C1_Util_DX_ComArray_C1_Util_DX_Direct3D11_SamplerState__" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetSamplers(System.Int32,System.Int32,C1.Util.DX.ComArray{C1.Util.DX.Direct3D11.SamplerState})">SetSamplers(int, int, ComArray&lt;SamplerState&gt;)</h4>
<div class="markdown level1 summary"><p>Set an array of sampler states to the shader pipeline stage.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetSamplers(int startSlot, int numSamplers, ComArray&lt;SamplerState&gt; samplers)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetSamplers(startSlot As Integer, numSamplers As Integer, samplers As ComArray(Of SamplerState))</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">startSlot</span></td>
      <td><p>Index into the device's zero-based array to begin setting samplers to (ranges from 0 to D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">numSamplers</span></td>
      <td><p>Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.ComArray-1.html">ComArray</a>&lt;<a class="xref" href="C1.Util.DX.Direct3D11.SamplerState.html">SamplerState</a>&gt;</td>
      <td><span class="parametername">samplers</span></td>
      <td><p>Pointer to an array of sampler-state interfaces (see <a class="xref" href="C1.Util.DX.Direct3D11.SamplerState.html">SamplerState</a>). See Remarks.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
