示例#1
0
        /// <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;
            }
        }
示例#2
0
文件: Sky.cs 项目: ttou73/IronStar
        /// <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;
        }
示例#3
0
		/// <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;
		}
示例#4
0
		/// <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;
			}
		}
示例#5
0
        /// <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;
            }
        }