Exemplo n.º 1
0
            /// <summary>
            /// Gathers parameters from the specified material.
            /// </summary>
            /// <param name="window">The window.</param>
            public void OnLoad(MaterialWindow window)
            {
                // Update cache
                var material = window.Asset;
                var info     = material.Info;

                Wireframe                   = (info.FeaturesFlags & MaterialFeaturesFlags.Wireframe) != 0;
                CullMode                    = info.CullMode;
                DepthTest                   = (info.FeaturesFlags & MaterialFeaturesFlags.DisableDepthTest) == 0;
                DepthWrite                  = (info.FeaturesFlags & MaterialFeaturesFlags.DisableDepthWrite) == 0;
                EnableReflections           = (info.FeaturesFlags & MaterialFeaturesFlags.DisableReflections) == 0;
                EnableFog                   = (info.FeaturesFlags & MaterialFeaturesFlags.DisableFog) == 0;
                EnableDistortion            = (info.FeaturesFlags & MaterialFeaturesFlags.DisableDistortion) == 0;
                PixelNormalOffsetRefraction = (info.FeaturesFlags & MaterialFeaturesFlags.PixelNormalOffsetRefraction) != 0;
                InputWorldSpaceNormal       = (info.FeaturesFlags & MaterialFeaturesFlags.InputWorldSpaceNormal) != 0;
                DitheredLODTransition       = (info.FeaturesFlags & MaterialFeaturesFlags.DitheredLODTransition) != 0;
                OpacityThreshold            = info.OpacityThreshold;
                TessellationMode            = info.TessellationMode;
                MaxTessellationFactor       = info.MaxTessellationFactor;
                MaskThreshold               = info.MaskThreshold;
                DecalBlendingMode           = info.DecalBlendingMode;
                PostFxLocation              = info.PostFxLocation;
                BlendMode                   = info.BlendMode;
                ShadingModel                = info.ShadingModel;
                Domain = info.Domain;

                // Link
                Window = window;
            }
Exemplo n.º 2
0
            /// <summary>
            /// Gathers parameters from the specified material.
            /// </summary>
            /// <param name="materialWin">The material window.</param>
            public void OnLoad(MaterialWindow materialWin)
            {
                // Update cache
                var material = materialWin.Asset;
                var info     = material.Info;

                Wireframe                = (info.Flags & MaterialFlags.Wireframe) != 0;
                TwoSided                 = (info.Flags & MaterialFlags.TwoSided) != 0;
                DisableDepthTest         = (info.Flags & MaterialFlags.TransparentDisableDepthTest) != 0;
                DisableReflections       = (info.Flags & MaterialFlags.TransparentDisableReflections) != 0;
                DisableFog               = (info.Flags & MaterialFlags.TransparentDisableFog) != 0;
                DisableDepthWrite        = (info.Flags & MaterialFlags.DisableDepthWrite) != 0;
                DisableDistortion        = (info.Flags & MaterialFlags.TransparentDisableDistortion) != 0;
                UseInputWorldSpaceNormal = (info.Flags & MaterialFlags.InputWorldSpaceNormal) != 0;
                UseDitheredLODTransition = (info.Flags & MaterialFlags.UseDitheredLODTransition) != 0;
                OpacityThreshold         = info.OpacityThreshold;
                TessellationMode         = info.TessellationMode;
                MaxTessellationFactor    = info.MaxTessellationFactor;
                MaskThreshold            = info.MaskThreshold;
                DecalBlendingMode        = info.DecalBlendingMode;
                PostFxLocation           = info.PostFxLocation;
                BlendMode                = info.BlendMode;
                ShadingModel             = info.ShadingModel;
                Lighting                 = info.TransparentLighting;
                Domain = info.Domain;

                // Link
                MaterialWinRef = materialWin;
            }
Exemplo n.º 3
0
            /// <summary>
            /// Gathers parameters from the specified material.
            /// </summary>
            /// <param name="materialWin">The material window.</param>
            public void OnLoad(MaterialWindow materialWin)
            {
                // Update cache
                var material = materialWin.Asset;
                var info     = material.Info;

                Wireframe          = (info.Flags & MaterialFlags.Wireframe) != 0;
                TwoSided           = (info.Flags & MaterialFlags.TwoSided) != 0;
                DisableDepthTest   = (info.Flags & MaterialFlags.TransparentDisableDepthTest) != 0;
                DisableReflections = (info.Flags & MaterialFlags.TransparentDisableReflections) != 0;
                DisableFog         = (info.Flags & MaterialFlags.TransparentDisableFog) != 0;
                DisableDepthWrite  = (info.Flags & MaterialFlags.DisableDepthWrite) != 0;
                DisableDistortion  = (info.Flags & MaterialFlags.TransparentDisableDistortion) != 0;
                OpacityThreshold   = info.OpacityThreshold;
                MaskThreshold      = info.MaskThreshold;
                PostFxLocation     = info.PostFxLocation;
                BlendMode          = info.BlendMode;
                Lighting           = info.TransparentLighting;
                Domain             = info.Domain;

                // Link
                MaterialWinRef = materialWin;
            }
Exemplo n.º 4
0
 /// <summary>
 /// Clears temporary data.
 /// </summary>
 public void OnClean()
 {
     // Unlink
     MaterialWinRef = null;
 }