public static ConstantBufferWrapper FromDescription(Renderer Renderer, ConstantBufferWrapperDescription desc)
 {
     ConstantBufferWrapper w = new ConstantBufferWrapper(Renderer, desc.SizeInBytes, desc.ShaderType, desc.ResourceSlot);
     w.Semantics = desc.Semantics;
     return w;
 }
        static MaterialShader GenerateDefaultMaterial(Renderer Renderer)
        {
            string path = @"R:\Users\Rox Cox\Documents\Visual Studio 2013\Projects\LightingEngine_v2\LightingEngine_v2\LightingD3D11\HLSL\";
            ShaderFlags flags = ShaderFlags.Debug | ShaderFlags.EnableStrictness | ShaderFlags.PackMatrixRowMajor;
            MaterialShader m = new MaterialShader(Renderer);
            m.StaticMeshVertexDefinition = new VertexDefinition()
            {
                Parameters = new List<VertexParameterType>()
                {
                    VertexParameterType.Position,
                    VertexParameterType.Normal,
                    VertexParameterType.TextureCoordinate,
                    VertexParameterType.Tangent,
                    VertexParameterType.Binormal,
                }
            };
            using (ShaderBytecode bytecode = ShaderBytecode.CompileFromFile(path + "materialVS.hlsl", "VS", "vs_5_0", flags, EffectFlags.None))
            {
                m.VertexShader = new VertexShader(Renderer.Device, bytecode);
                m.StaticMeshInputLayout = m.StaticMeshVertexDefinition.GetInputLayout(bytecode);
            }
            /*using (ShaderBytecode bytecode = ShaderBytecode.CompileFromFile(path + "materialPS.hlsl", "ps_5_0"))
            {
                m.PixelShader = new PixelShader(Renderer.Device, bytecode);
            }*/
            m.Topology = PrimitiveTopology.TriangleList;
            m.Samplers.Add(SamplerState.FromDescription(Renderer.Device, new SamplerDescription()
            {
                AddressU = TextureAddressMode.Wrap,
                AddressV = TextureAddressMode.Wrap,
                AddressW = TextureAddressMode.Wrap,
                BorderColor = new Color4(1, 1, 1, 1),
                ComparisonFunction = Comparison.Never,
                Filter = Filter.Anisotropic,
                MaximumAnisotropy = 16,
                MaximumLod = float.MaxValue,
                MinimumLod = float.MinValue,
                MipLodBias = 0,
            }));
            ConstantBufferWrapper bf0 = new ConstantBufferWrapper(Renderer, sizeof(float) * 64, ShaderType.VertexShader, 0);
            bf0.Semantics.Add(Semantic.World);
            bf0.Semantics.Add(Semantic.ViewProj);
            bf0.Semantics.Add(Semantic.View);
            bf0.Semantics.Add(Semantic.WorldView);
            m.ConstantBuffers.Add(bf0);
            using (Texture2D tex = ContentHelper.TextureFromBitmap(Properties.Resources.notexture))
            {
                m.ShaderResources.Add(new ShaderResourceView(Renderer.Device, tex));
            }
            using (Texture2D tex = ContentHelper.TextureFromBitmap(Properties.Resources.notexture_NORM))
            {
                m.ShaderResources.Add(new ShaderResourceView(Renderer.Device, tex));
            }

            return m;
        }