예제 #1
0
        private static void UpdateAntialiasingMode(MyAntialiasingMode mode, MyAntialiasingMode oldMode)
        {
            var defineList = new List <ShaderMacro>();
            var msDefine   = ShaderMultisamplingDefine();

            if (msDefine.HasValue)
            {
                defineList.Add(msDefine.Value);
            }

            MyShaders.SetGlobalMacros(defineList);

            MyShaders.Recompile();
            MyMaterialShaders.Recompile();
            MyRenderableComponent.MarkAllDirty();

            if (mode.SamplesCount() != oldMode.SamplesCount())
            {
                CreateScreenResources();
            }
        }