Exemplo n.º 1
0
        public EffectPass(string rasterizer, string blend, string depthStencil,
            string shader, string vertexEntryPoint, string pixelEntryPoint, 
            TechniqueTags tags, Effect effect)
        {
            if (rasterizer != "")
            {
                _hasRasterizerState = true;
                _rasterizerState = MaterialManager.RenderStates.GetRasterizerState(rasterizer);
            }

            if (blend != "")
            {
                _hasBlendState = true;
                _blendState = MaterialManager.RenderStates.GetBlendState(blend);
            }

            if (depthStencil != "")
            {
                _hasDepthStencilState = true;
                _depthStencilState = MaterialManager.RenderStates.GetDepthStencilState(depthStencil);
            }

            _tags = tags;

            _shader = new Shader(shader, tags, true, pixelEntryPoint, vertexEntryPoint);
        }
Exemplo n.º 2
0
        public void AddBlendState(string name, BlendState state)
        {
            blendLastAdded++;
            blendStates[blendLastAdded] = state;

            blendNames.Add(name, blendLastAdded);
            state.SetNameAndIndex(name, blendLastAdded);
        }
Exemplo n.º 3
0
 public static void SetBlendState(BlendState state, Color4 blendFactor, uint multiSampleMask = 0xFFFFFFFF)
 {
     DeviceContext.OutputMerger.SetBlendState(state.NativeBlendState, blendFactor, multiSampleMask);
 }
Exemplo n.º 4
0
 public void SetBlendState(BlendState state)
 {
     SetBlendState(state, Color4.White);
 }
Exemplo n.º 5
0
 public void SetBlendState(BlendState state, Color4 blendFactor)
 {
     if (state == null)
         GraphicManager.SetBlendState(DefaultBlendState, Color4.White);
     else
         GraphicManager.SetBlendState(state, blendFactor);
 }