Exemple #1
0
        private void CheckPipelines(string shaderName, ShaderData shaderData)
        {
            var pd = new GraphicsPipelineDescription();

            pd.BlendState           = activeCamera.BlendState;
            pd.RasterizerState      = activeCamera.RasterizerState;
            pd.DepthStencilState    = activeCamera.DepthStencilState;
            pd.ResourceBindingModel = ResourceBindingModel.Improved;
            pd.PrimitiveTopology    = PrimitiveTopology.TriangleStrip;          // TODO: Change to TriangleList
            pd.ResourceLayouts      = shaderData.ResourceLayouts;
            pd.ShaderSet            = new ShaderSetDescription(vertexLayoutDescriptions, shaderData.Shaders);
            pd.Outputs = activeCamera.RenderTarget.OutputDescription;

            if (PipelineList.TryAdd(pd.GetHashCode(), _gd.ResourceFactory.CreateGraphicsPipeline(ref pd)))
            {
                PipelineList[pd.GetHashCode()].Name = shaderName;
            }
        }
Exemple #2
0
 public void AddShader(string shaderSetName, ShaderData shaderData) => ShaderData.Add(shaderSetName, shaderData);