コード例 #1
0
 private void OnBindMaterialTextures(DeviceContextProxy context, PixelShader shader)
 {
     if (shader.IsNULL)
     {
         return;
     }
     shader.BindTexture(context, texStripeXSlot, textures[0]);
     shader.BindTexture(context, texStripeYSlot, textures[1]);
     shader.BindSampler(context, samplerDiffuseSlot, sampler);
 }
コード例 #2
0
            private void OnBindMaterialTextures(RenderContext context, DeviceContextProxy deviceContext, PixelShader shader)
            {
                if (shader.IsNULL)
                {
                    return;
                }
                var idx = shader.ShaderStageIndex;

                shader.BindTexture(deviceContext, texDiffuseSlot, textureResources[DiffuseIdx]);
                shader.BindTexture(deviceContext, texNormalSlot, textureResources[NormalIdx]);
                shader.BindTexture(deviceContext, texAlphaSlot, textureResources[AlphaIdx]);
                shader.BindTexture(deviceContext, texSpecularSlot, textureResources[SpecularColorIdx]);
                shader.BindTexture(deviceContext, texEmissiveSlot, textureResources[EmissiveIdx]);
                shader.BindSampler(deviceContext, samplerDiffuseSlot, surfaceSampler);
            }
コード例 #3
0
        private void BindBillboardTexture(DeviceContextProxy context, PixelShader shader)
        {
            var buffer = billboardBuffer;

            shader.BindTexture(context, shaderTextureSlot, buffer.TextureView);
            shader.BindSampler(context, textureSamplerSlot, textureSampler);
        }
コード例 #4
0
        private void OnBindMaterialTextures(RenderContext context, DeviceContextProxy deviceContext, PixelShader shader)
        {
            if (shader.IsNULL)
            {
                return;
            }
            int idx = shader.ShaderStageIndex;

            shader.BindTexture(deviceContext, texDiffuseSlot, TextureResources[DiffuseIdx]);
            shader.BindTexture(deviceContext, texNormalSlot, TextureResources[NormalIdx]);
            shader.BindTexture(deviceContext, texAlphaSlot, TextureResources[AlphaIdx]);

            shader.BindSampler(deviceContext, samplerDiffuseSlot, SamplerResources[DiffuseIdx]);
            shader.BindSampler(deviceContext, samplerNormalSlot, SamplerResources[NormalIdx]);
            shader.BindSampler(deviceContext, samplerAlphaSlot, SamplerResources[AlphaIdx]);
        }
コード例 #5
0
        private void OnBindMaterialTextures(RenderContext context, DeviceContextProxy deviceContext, PixelShader shader)
        {
            if (shader.IsNULL)
            {
                return;
            }
            int idx = shader.ShaderStageIndex;

            shader.BindTexture(deviceContext, texDiffuseSlot, TextureResources[AlbedoMapIdx]);
            shader.BindTexture(deviceContext, texNormalSlot, TextureResources[NormalMapIdx]);
            shader.BindTexture(deviceContext, texRMASlot, TextureResources[RMAMapIdx]);
            shader.BindTexture(deviceContext, texEmissiveSlot, TextureResources[EmissiveMapIdx]);
            shader.BindTexture(deviceContext, texIrradianceSlot, TextureResources[IrradianceMapIdx]);

            shader.BindSampler(deviceContext, samplerSurfaceSlot, SamplerResources[SurfaceSamplerIdx]);
            shader.BindSampler(deviceContext, samplerIBLSlot, SamplerResources[IBLSamplerIdx]);
        }
コード例 #6
0
            private void OnBindMaterialTextures(DeviceContextProxy context, PixelShader shader)
            {
                if (shader.IsNULL)
                {
                    return;
                }
                int idx = shader.ShaderStageIndex;

                shader.BindTexture(context, texDiffuseSlot, TextureResource);
                shader.BindSampler(context, samplerDiffuseSlot, SamplerResource);
            }