# C1.Util.DX.Direct3D11.CommonShaderStageBase.SetShaderResources

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetShaderResources_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetShaderResources*">SetShaderResources Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetShaderResources_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetShaderResources*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetShaderResources_System_Int32_C1_Util_DX_Direct3D11_ShaderResourceView___" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetShaderResources(System.Int32,C1.Util.DX.Direct3D11.ShaderResourceView[])">SetShaderResources(int, params ShaderResourceView[])</h4>
<div class="markdown level1 summary"><p>Bind an array of shader resources to 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 SetShaderResources(int startSlot, params ShaderResourceView[] shaderResourceViews)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetShaderResources(startSlot As Integer, ParamArray shaderResourceViews As ShaderResourceView())</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 shader resources to (ranges from 0 to D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.ShaderResourceView.html">ShaderResourceView</a>[]</td>
      <td><span class="parametername">shaderResourceViews</span></td>
      <td><p>Array of {{shader resource view}} interfaces to set to the device.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetShaderResources_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetShaderResources*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetShaderResources_System_Int32_C1_Util_DX_ComArray_C1_Util_DX_Direct3D11_ShaderResourceView__" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetShaderResources(System.Int32,C1.Util.DX.ComArray{C1.Util.DX.Direct3D11.ShaderResourceView})">SetShaderResources(int, ComArray&lt;ShaderResourceView&gt;)</h4>
<div class="markdown level1 summary"><p>Bind an array of shader resources to 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 SetShaderResources(int startSlot, ComArray&lt;ShaderResourceView&gt; shaderResourceViews)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetShaderResources(startSlot As Integer, shaderResourceViews As ComArray(Of ShaderResourceView))</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 shader resources to (ranges from 0 to D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1).</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.ShaderResourceView.html">ShaderResourceView</a>&gt;</td>
      <td><span class="parametername">shaderResourceViews</span></td>
      <td><p>Array of {{shader resource view}} interfaces to set to the device.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetShaderResources_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetShaderResources*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetShaderResources_System_Int32_System_Int32_C1_Util_DX_Direct3D11_ShaderResourceView___" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetShaderResources(System.Int32,System.Int32,C1.Util.DX.Direct3D11.ShaderResourceView[])">SetShaderResources(int, int, params ShaderResourceView[])</h4>
<div class="markdown level1 summary"><p>Bind an array of shader resources to 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 SetShaderResources(int startSlot, int numViews, params ShaderResourceView[] shaderResourceViews)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetShaderResources(startSlot As Integer, numViews As Integer, ParamArray shaderResourceViews As ShaderResourceView())</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 shader resources to (ranges from 0 to D3D11_COMMONSHADER_INPUT_RESOURCE_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">numViews</span></td>
      <td><p>Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.ShaderResourceView.html">ShaderResourceView</a>[]</td>
      <td><span class="parametername">shaderResourceViews</span></td>
      <td><p>Array of {{shader resource view}} interfaces to set to the device.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetShaderResources_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetShaderResources*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStageBase_SetShaderResources_System_Int32_System_Int32_C1_Util_DX_ComArray_C1_Util_DX_Direct3D11_ShaderResourceView__" data-uid="C1.Util.DX.Direct3D11.CommonShaderStageBase.SetShaderResources(System.Int32,System.Int32,C1.Util.DX.ComArray{C1.Util.DX.Direct3D11.ShaderResourceView})">SetShaderResources(int, int, ComArray&lt;ShaderResourceView&gt;)</h4>
<div class="markdown level1 summary"><p>Bind an array of shader resources to 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 SetShaderResources(int startSlot, int numViews, ComArray&lt;ShaderResourceView&gt; shaderResourceViewsRef)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetShaderResources(startSlot As Integer, numViews As Integer, shaderResourceViewsRef As ComArray(Of ShaderResourceView))</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 shader resources to (ranges from 0 to D3D11_COMMONSHADER_INPUT_RESOURCE_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">numViews</span></td>
      <td><p>Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to D3D11_COMMONSHADER_INPUT_RESOURCE_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.ShaderResourceView.html">ShaderResourceView</a>&gt;</td>
      <td><span class="parametername">shaderResourceViewsRef</span></td>
      <td><p>Array of {{shader resource view}} interfaces to set to the device.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
