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); }
public void AddBlendState(string name, BlendState state) { blendLastAdded++; blendStates[blendLastAdded] = state; blendNames.Add(name, blendLastAdded); state.SetNameAndIndex(name, blendLastAdded); }
public static void SetBlendState(BlendState state, Color4 blendFactor, uint multiSampleMask = 0xFFFFFFFF) { DeviceContext.OutputMerger.SetBlendState(state.NativeBlendState, blendFactor, multiSampleMask); }
public void SetBlendState(BlendState state) { SetBlendState(state, Color4.White); }
public void SetBlendState(BlendState state, Color4 blendFactor) { if (state == null) GraphicManager.SetBlendState(DefaultBlendState, Color4.White); else GraphicManager.SetBlendState(state, blendFactor); }