/// <summary> /// /// </summary> /// <param name="ps"></param> /// <param name="flags"></param> void EnumFunc(PipelineState ps, SkyFlags flags) { ps.VertexInputElements = VertexInputElement.FromStructure <VertexColorTextureTBN>(); ps.RasterizerState = RasterizerState.CullNone; ps.BlendState = BlendState.Opaque; ps.DepthStencilState = flags.HasFlag(SkyFlags.FOG) ? DepthStencilState.None : DepthStencilState.Readonly; if (flags.HasFlag(SkyFlags.CLOUDS)) { ps.BlendState = BlendState.AlphaBlend; } //if (flags.HasFlag(SkyFlags.RED)) { // ps.BlendState = BlendState.Create(ColorChannels.Red); //} //if (flags.HasFlag(SkyFlags.BLUE)) { // ps.BlendState = BlendState.Create(ColorChannels.Blue); //} //if (flags.HasFlag(SkyFlags.GREEN)) { // ps.BlendState = BlendState.Create(ColorChannels.Green); //} if (flags.HasFlag(SkyFlags.BLUR_CLOUD)) { ps.BlendState = BlendState.AlphaBlend; } }
/// <summary> /// /// </summary> /// <param name="ps"></param> /// <param name="flags"></param> void EnumFunc(PipelineState ps, SkyFlags flags) { ps.VertexInputElements = VertexInputElement.FromStructure <SkyVertex>(); // do not cull triangles for both for RH and LH coordinates // for direct view and cubemaps. ps.RasterizerState = RasterizerState.CullNone; ps.BlendState = BlendState.Opaque; ps.DepthStencilState = flags.HasFlag(SkyFlags.FOG) ? DepthStencilState.None : DepthStencilState.Readonly; }
/// <summary> /// /// </summary> /// <param name="ps"></param> /// <param name="flags"></param> void EnumFunc ( PipelineState ps, SkyFlags flags ) { ps.VertexInputElements = VertexInputElement.FromStructure<SkyVertex>(); // do not cull triangles for both for RH and LH coordinates // for direct view and cubemaps. ps.RasterizerState = RasterizerState.CullNone; ps.BlendState = BlendState.Opaque; ps.DepthStencilState = flags.HasFlag(SkyFlags.FOG) ? DepthStencilState.None : DepthStencilState.Readonly; }
/// <summary> /// /// </summary> /// <param name="ps"></param> /// <param name="flags"></param> void EnumFunc ( PipelineState ps, SkyFlags flags ) { ps.VertexInputElements = VertexInputElement.FromStructure<VertexColorTextureTBN>(); ps.RasterizerState = RasterizerState.CullNone; ps.BlendState = BlendState.Opaque; ps.DepthStencilState = flags.HasFlag(SkyFlags.FOG) ? DepthStencilState.None : DepthStencilState.Readonly; if (flags.HasFlag(SkyFlags.CLOUDS)) { ps.BlendState = BlendState.AlphaBlend; } }
/// <summary> /// /// </summary> /// <param name="ps"></param> /// <param name="flags"></param> void EnumFunc( PipelineState ps, SkyFlags flags ) { ps.VertexInputElements = VertexInputElement.FromStructure<VertexColorTextureTBN>(); ps.RasterizerState = RasterizerState.CullNone; ps.BlendState = BlendState.Opaque; ps.DepthStencilState = flags.HasFlag(SkyFlags.FOG) ? DepthStencilState.None : DepthStencilState.Readonly; if (flags.HasFlag(SkyFlags.CLOUDS)) { ps.BlendState = BlendState.AlphaBlend; } //if (flags.HasFlag(SkyFlags.RED)) { // ps.BlendState = BlendState.Create(ColorChannels.Red); //} //if (flags.HasFlag(SkyFlags.BLUE)) { // ps.BlendState = BlendState.Create(ColorChannels.Blue); //} //if (flags.HasFlag(SkyFlags.GREEN)) { // ps.BlendState = BlendState.Create(ColorChannels.Green); //} if ( flags.HasFlag( SkyFlags.BLUR_CLOUD ) ) { ps.BlendState = BlendState.AlphaBlend; } }