Exemple #1
0
            public void SetSamplers(DomainShaderType shaderType, int slot, SamplerState[] samplers)
            {
                if (slot < 0)
                {
                    return;
                }
                int  idx        = SamplerCheckDomainShaderStartIdx + slot;
                bool needUpdate = false;

                for (int i = 0; i < samplers.Length; ++i)
                {
                    if (SamplerStateCheck[idx + i] != samplers[i])
                    {
                        needUpdate = true;
                        break;
                    }
                }
                if (needUpdate)
                {
                    for (int i = 0; i < samplers.Length; ++i)
                    {
                        SamplerStateCheck[idx + i] = samplers[i];
                    }
                    deviceContext.DomainShader.SetSamplers(slot, samplers);
                }
            }
Exemple #2
0
 public void SetShaderResources(DomainShaderType shaderType, int slot, ShaderResourceView[] texture)
 {
     if (slot < 0)
     {
         return;
     }
     deviceContext.DomainShader.SetShaderResources(slot, texture);
 }
Exemple #3
0
 public void SetSamplers(DomainShaderType shaderType, int slot, SamplerState[] samplers)
 {
     if (slot < 0)
     {
         return;
     }
     deviceContext.DomainShader.SetSamplers(slot, samplers);
 }
Exemple #4
0
            public void SetSampler(DomainShaderType shaderType, int slot, SamplerState sampler)
            {
                if (slot < 0)
                {
                    return;
                }
                int idx = SamplerCheckDomainShaderStartIdx + slot;

                if (SamplerStateCheck[idx] != sampler)
                {
                    SamplerStateCheck[idx] = sampler;
                    deviceContext.DomainShader.SetSampler(slot, sampler);
                }
            }
Exemple #5
0
 public DomainShader GetShader(DomainShaderType type)
 {
     return(DomainShader);
 }
Exemple #6
0
 public SamplerState[] GetSampler(DomainShaderType shaderType, int startSlot, int num)
 {
     return(deviceContext.DomainShader.GetSamplers(startSlot, num));
 }
Exemple #7
0
 public ShaderResourceView[] GetShaderResources(DomainShaderType shaderType, int startSlot, int num)
 {
     return(deviceContext.DomainShader.GetShaderResources(startSlot, num));
 }