Esempio n. 1
0
        public void SSAOPostFxsetShaderConsts(coPostEffect thisobj)
        {
            //thisobj.setShaderConst("$",);
            thisobj.setShaderConst("$sRadius", sGlobal["$SSAOPostFx::sRadius"]);
            thisobj.setShaderConst("$sStrength", sGlobal["$SSAOPostFx::sStrength"]);
            thisobj.setShaderConst("$sDepthMin", sGlobal["$SSAOPostFx::sDepthMin"]);
            thisobj.setShaderConst("$sDepthMax", sGlobal["$SSAOPostFx::sDepthMax"]);
            thisobj.setShaderConst("$sDepthPow", sGlobal["$SSAOPostFx::sDepthPow"]);
            thisobj.setShaderConst("$sNormalTol", sGlobal["$SSAOPostFx::sNormalTol"]);
            thisobj.setShaderConst("$sNormalPow", sGlobal["$SSAOPostFx::sNormalPow"]);
            thisobj.setShaderConst("$lRadius", sGlobal["$SSAOPostFx::lRadius"]);
            thisobj.setShaderConst("$lStrength", sGlobal["$SSAOPostFx::lStrength"]);
            thisobj.setShaderConst("$lDepthMin", sGlobal["$SSAOPostFx::lDepthMin"]);
            thisobj.setShaderConst("$lDepthMax", sGlobal["$SSAOPostFx::lDepthMax"]);
            thisobj.setShaderConst("$lDepthPow", sGlobal["$SSAOPostFx::lDepthPow"]);
            thisobj.setShaderConst("$lNormalTol", sGlobal["$SSAOPostFx::lNormalTol"]);
            thisobj.setShaderConst("$lNormalPow", sGlobal["$SSAOPostFx::lNormalPow"]);

            coPostEffect blur = thisobj.findObjectByInternalName("blurY", false);

            blur.setShaderConst("$blurDepthTol", sGlobal["$SSAOPostFx::blurDepthTol"]);
            blur.setShaderConst("$blurNormalTol", sGlobal["$SSAOPostFx::blurNormalTol"]);

            blur = thisobj.findObjectByInternalName("blurX", false);
            blur.setShaderConst("$blurDepthTol", sGlobal["$SSAOPostFx::blurDepthTol"]);
            blur.setShaderConst("$blurNormalTol", sGlobal["$SSAOPostFx::blurNormalTol"]);

            blur = thisobj.findObjectByInternalName("blurY2", false);
            blur.setShaderConst("$blurDepthTol", sGlobal["$SSAOPostFx::blurDepthTol"]);
            blur.setShaderConst("$blurNormalTol", sGlobal["$SSAOPostFx::blurNormalTol"]);

            blur = thisobj.findObjectByInternalName("blurX2", false);
            blur.setShaderConst("$blurDepthTol", sGlobal["$SSAOPostFx::blurDepthTol"]);
            blur.setShaderConst("$blurNormalTol", sGlobal["$SSAOPostFx::blurNormalTol"]);
        }
 public void GammaPostFXpreProcess(coPostEffect thisobj)
 {
     if (thisobj["texture[1]"] != sGlobal["$HDRPostFX::colorCorrectionRamp"])
     {
         thisobj.setTexture(1, sGlobal["$HDRPostFX::colorCorrectionRamp"]);
     }
 }
Esempio n. 3
0
 public void DOFPostEffectsetFocusParams(coPostEffect thisobj, float nearBlurMax, float farBlurMax, float minRange, float maxRange, float nearSlope, float farSlope)
 {
     thisobj["nearBlurMax"] = nearBlurMax.AsString();
     thisobj["farBlurMax"]  = farBlurMax.AsString();
     thisobj["minRange"]    = minRange.AsString();
     thisobj["maxRange"]    = maxRange.AsString();
     thisobj["nearSlope"]   = nearSlope.AsString();
     thisobj["farSlope"]    = farSlope.AsString();
 }
        public void HDRPostFXpreProcess(coSimSet thisobj)
        {
            coPostEffect combinePass = thisobj.findObjectByInternalName("combinePass", true);

            if (combinePass[".texture[3]"] != sGlobal["$HDRPostFX::colorCorrectionRamp"])
            {
                combinePass.setTexture(3, sGlobal["$HDRPostFX::colorCorrectionRamp"]);
            }
        }
Esempio n. 5
0
 public void SSAOPostFxpreProcess(coPostEffect thisobj)
 {
     if (sGlobal["$SSAOPostFx::quality"] != thisobj["quality"])
     {
         thisobj["quality"] = Util.mClamp(Util.mRound(console.GetVarFloat("$SSAOPostFx::quality")), 0, 2).AsString();
         thisobj.setShaderMacro("QUALITY", thisobj["quality"]);
     }
     thisobj["targetScale"] = sGlobal["$SSAOPostFx::targetScale"];
 }
        public bool LuminanceVisPostFXonEnabled(string thisobj)
        {
            coPostEffect HDRPostFX = "HDRPostFX";

            if (!HDRPostFX.isEnabledX())
            {
                HDRPostFX.enable();
            }
            HDRPostFX["skip"] = true.AsString();
            return(true);
        }
Esempio n. 7
0
        public void LightRayPostFXsetShaderConsts(coPostEffect thisobj)
        {
            thisobj.setShaderConst("$brightScalar", sGlobal["$LightRayPostFX::brightScalar"]);
            coPostEffect pfx = thisobj.findObjectByInternalName("final", true);

            pfx.setShaderConst("$numSamples", sGlobal["$LightRayPostFX::numSamples"]);
            pfx.setShaderConst("$density", sGlobal["$LightRayPostFX::density"]);
            pfx.setShaderConst("$weight", sGlobal["$LightRayPostFX::weight"]);
            pfx.setShaderConst("$decay", sGlobal["$LightRayPostFX::decay"]);
            pfx.setShaderConst("$exposure", sGlobal["$LightRayPostFX::exposure"]);
        }
Esempio n. 8
0
        public void DOFPostEffectsetLerpDist(coPostEffect thisobj, string d0, string d1, string d2)
        {
            thisobj["lerpScale"] = (-1.0 / d0.AsFloat()).AsString() + " " + (-1.0 / d1.AsFloat()).AsString() + " " + (-1.0 / d2.AsFloat()).AsString() + " " + (1.0 / d2.AsFloat()).AsString();


            string lerpbias = "1.0 ";

            lerpbias += ((1 - d2.AsFloat()) / d1.AsFloat()).AsString() + " ";
            lerpbias += (1.0 / d2.AsFloat()).AsString() + " ";
            lerpbias += ((d2.AsFloat() - 1.0) / d2.AsFloat()).AsString();

            thisobj["lerpBias"] = lerpbias;
        }
Esempio n. 9
0
        public void FlashFxsetShaderConsts(coPostEffect thisobj)
        {
            coGameConnection serverConnection = "ServerConnection";

            if (console.isObject(thisobj))
            {
                thisobj.setShaderConst("$damageFlash", serverConnection.getDamageFlash().AsString());
                thisobj.setShaderConst("$whiteOut", serverConnection.getWhiteOut().AsString());
            }
            else
            {
                thisobj.setShaderConst("$damageFlash", "0");
                thisobj.setShaderConst("$whiteOut", "0");
            }
        }
Esempio n. 10
0
        public void DOFPostEffectonAdd(coPostEffect thisobj)
        {
            // The weighted distribution of CoC value to the three blur textures
            // in the order small, medium, large. Most likely you will not need to
            // change this value.
            DOFPostEffectsetLerpDist(thisobj, "0.2", "0.3", "0.5");

            thisobj["autoFocusEnabled"] = false.AsString();
            thisobj["focalDist"]        = "0";
            thisobj["nearBlurMax"]      = ".5";
            thisobj["farBlurMax"]       = ".5";
            thisobj["minRange"]         = "50";
            thisobj["maxRange"]         = "500";
            thisobj["nearSlope"]        = "-5";
            thisobj["farSlope"]         = "5";
        }
Esempio n. 11
0
        public void DOFPostEffectsetShaderConsts(coPostEffect posteffect)
        {
            if (posteffect["autoFocusEnabled"].AsBool())
            {
                DOFPostEffectautoFocus(posteffect);
            }


            double fd    = posteffect["focalDist"].AsFloat() / fGlobal["$Param::FarDist"];
            double range = Util.mLerp(posteffect["minRange"].AsFloat(), posteffect["maxRange"].AsFloat(), (float)fd) / fGlobal["$Param::FarDist"] * .5;
            // We work in "depth" space rather than real-world units for the
            // rest of this method...

            // Given the focal distance and the range around it we want in focus
            // we can determine the near-end-distance and far-start-distance

            double ned = Util.getMax((float)fd - (float)range, (float)0.0);
            double fsd = Util.getMin((float)fd + (float)range, (float)1.0);
            // near slope
            float nsl = posteffect["nearSlope"].AsFloat();
            // Given slope of near blur equation and the near end dist and amount (x2,y2)
            // solve for the y-intercept
            // y = mx + b
            // so...
            // y - mx = b

            float  b      = (float)0.0 - nsl * (float)ned;
            string eqNear = nsl.AsString() + " " + b.AsString() + " 0.0";

            // Do the same for the far blur equation...

            float fsl = posteffect["farSlope"].AsFloat();

            b = (float)0.0 - fsl * (float)fsd;

            string eqFar = fsl.AsString() + " " + b.AsString() + " " + "1.0";

            coPostEffect DOFFinalPFX = "DOFFinalPFX";

            posteffect.setShaderConst("$dofEqWorld", eqNear);
            DOFFinalPFX.setShaderConst("$dofEqFar", eqFar);
            posteffect.setShaderConst("$maxWorldCoC", posteffect["nearBlurMax"]);
            DOFFinalPFX.setShaderConst("$maxFarCoC", posteffect["farBlurMax"]);
            DOFFinalPFX.setShaderConst("$dofLerpScale", posteffect["lerpScale"]);
            DOFFinalPFX.setShaderConst("$dofLerpBias", posteffect["lerpBias"]);
        }
Esempio n. 12
0
        public void ppOptionsUpdateDOFSettings()
        {
            coPostEffect DOFPostEffect = "DOFPostEffect";

            DOFPostEffectsetFocusParams(DOFPostEffect, fGlobal["$DOFPostFx::BlurMin"], fGlobal["$DOFPostFx::BlurMax"], fGlobal["$DOFPostFx::FocusRangeMin"], fGlobal["$DOFPostFx::FocusRangeMax"], fGlobal["$DOFPostFx::BlurCurveNear"] * -1.0f, fGlobal["$DOFPostFx::BlurCurveFar"]);


            DOFPostEffectsetAutoFocus(DOFPostEffect, bGlobal["$DOFPostFx::EnableAutoFocus"]);
            DOFPostEffectsetFocalDist(DOFPostEffect, "0");

            if (bGlobal["$PostFXManager::PostFX::EnableDOF"])
            {
                DOFPostEffect.enable();
            }
            else
            {
                DOFPostEffect.disable();
            }
        }
Esempio n. 13
0
        public void HDRPostFXsetShaderConsts(coPostEffect thisobj)
        {
            thisobj.setShaderConst("$brightPassThreshold", sGlobal["$HDRPostFX::brightPassThreshold"]);
            thisobj.setShaderConst("$g_fMiddleGray", sGlobal["$HDRPostFX::keyValue"]);
            coPostEffect bloomh = thisobj.findObjectByInternalName("bloomH", true);

            bloomh.setShaderConst("$gaussMultiplier", sGlobal["$HDRPostFX::gaussMultiplier"]);
            bloomh.setShaderConst("$gaussMean", sGlobal["$HDRPostFX::gaussMean"]);
            bloomh.setShaderConst("$gaussStdDev", sGlobal["$HDRPostFX::gaussStdDev"]);

            coPostEffect bloomV = thisobj.findObjectByInternalName("bloomV", true);

            bloomV.setShaderConst("$gaussMultiplier", sGlobal["$HDRPostFX::gaussMultiplier"]);
            bloomV.setShaderConst("$gaussMean", sGlobal["$HDRPostFX::gaussMean"]);
            bloomV.setShaderConst("$gaussStdDev", sGlobal["$HDRPostFX::gaussStdDev"]);

            double minLuminace = dGlobal["$HDRPostFX::minLuminace"];

            if (minLuminace <= 0.0)
            {
                minLuminace = 0.00001;
            }

            ((coPostEffect)thisobj.findObjectByInternalName("adaptLum", true)).setShaderConst("$g_fMinLuminace", minLuminace.AsString());
            ((coPostEffect)thisobj.findObjectByInternalName("finalLum", true)).setShaderConst("$adaptRate", sGlobal["$HDRPostFX::adaptRate"]);

            coPostEffect combinePass = thisobj.findObjectByInternalName("combinePass", true);

            combinePass.setShaderConst("$g_fEnableToneMapping", sGlobal["$HDRPostFX::enableToneMapping"]);
            combinePass.setShaderConst("$g_fMiddleGray", sGlobal["$HDRPostFX::keyValue"]);

            combinePass.setShaderConst("$g_fBloomScale", sGlobal["$HDRPostFX::enableBloom"]);
            combinePass.setShaderConst("$g_fEnableBlueShift", sGlobal["$HDRPostFX::enableBlueShift"]);
            combinePass.setShaderConst("$g_fBlueShiftColor", sGlobal["$HDRPostFX::blueShiftColor"]);

            float clampedGamma = Util.mClamp(fGlobal["$pref::Video::Gamma"], (float)0.001, (float)2.2);

            combinePass.setShaderConst("$g_fOneOverGamma", (1 / clampedGamma).AsString());
            float whiteCutoff = fGlobal["$HDRPostFX::whiteCutoff"] * fGlobal["$HDRPostFX::whiteCutoff"] * fGlobal["$HDRPostFX::whiteCutoff"] * fGlobal["$HDRPostFX::whiteCutoff"];

            combinePass.setShaderConst("$g_fWhiteCutoff", whiteCutoff.AsString());
        }
Esempio n. 14
0
        public void DOFPostEffectautoFocus(coPostEffect thisobj)
        {
            try
            {
                coGameConnection serverconnection = "ServerConnection";
                coCamera         camera           = serverconnection.getCameraObject();

                uint mask = (uint)(WinterLeaf.Enums.SceneObjectTypesAsUint.StaticObjectType | WinterLeaf.Enums.SceneObjectTypesAsUint.TerrainObjectType);


                //string control = GameConnection.getCameraObject("ServerConnection"); //console.Call("ServerConnection", "getCameraObject");

                Point3F fvec  = camera.getEyeVector();
                Point3F start = camera.getEyePoint();

                //Point3F fvec = ShapeBase.getEyeVector(control); // console.Call(control, "getEyeVector");
                //Point3F start = ShapeBase.getEyePoint(control); // console.Call(control, "getEyePoint");

                Point3F end = Util.VectorAdd(start, Util.VectorScale(fvec, fGlobal["$Param::FarDist"]));

                string result = Util.containerRayCast(start, end, mask, camera, true);

                string hitPos  = Util.getWords(result, 1, 3);
                string focDist = sGlobal["$Param::FarDist"];
                if (hitPos != "")
                {
                    focDist = Util.VectorDist(new Point3F(hitPos), start).AsString();
                }

                thisobj["focalDist"] = focDist;
            }
            catch (Exception)
            {
                //Do nothing, this only gets hit when it can't find the serverconnection or the camera.
            }
        }
Esempio n. 15
0
        public void configureCanvas()
        {
            coGuiCanvas canvas = "Canvas";

            // Setup a good default if we don't have one already.
            if (sGlobal["$pref::Video::mode"] == "")
            {
                sGlobal["$pref::Video::mode"] = "800 600 false 32 60 0";
            }


            string data = sGlobal["$pref::Video::mode"];
            string resX = Util.getWord(data, iGlobal["$WORD::RES_X"]);
            string resY = Util.getWord(data, iGlobal["$WORD::RES_Y"]);
            string fs   = Util.getWord(data, iGlobal["$WORD::FULLSCREEN"]);
            string bpp  = Util.getWord(data, iGlobal["$WORD::BITDEPTH"]);
            string rate = Util.getWord(data, iGlobal["$WORD::REFRESH"]);
            string fsaa = Util.getWord(data, iGlobal["$WORD::AA"]);

            console.print("--------------");
            console.print("Attempting to set resolution to \"" + console.GetVarString("$pref::Video::mode") + "\"");

            string deskRes    = Util.getDesktopResolution().AsString();
            string deskResX   = Util.getWord(deskRes, iGlobal["$WORD::RES_X"]);
            string deskResY   = Util.getWord(deskRes, iGlobal["$WORD::RES_Y"]);
            string deskResBPP = Util.getWord(deskRes, 2);

            // We shouldn't be getting this any more but just in case...
            if (bpp == "Default")
            {
                bpp = deskResBPP;
            }

            // Make sure we are running at a valid resolution
            if (fs == "0" || fs == "false")
            {
                // Windowed mode has to use the same bit depth as the desktop
                bpp = deskResBPP;
                if (resX.AsInt() >= deskResX.AsInt() || resY.AsInt() >= deskResY.AsInt())
                {
                    console.print("Warning: The requested windowed resolution is equal to or larger than the current desktop resolution. Attempting to find a better resolution");
                    string rescount = ((coGuiCanvas)"Canvas").getModeCount().AsString();
                    for (int i = (rescount.AsInt() - 1); i >= 0; i--)
                    {
                        string testRes  = canvas.getMode(i);
                        string testResX = Util.getWord(testRes, iGlobal["$WORD::RES_X"]);
                        string testResY = Util.getWord(testRes, iGlobal["$WORD::RES_Y"]);
                        string testBPP  = Util.getWord(testRes, iGlobal["$WORD::BITDEPTH"]);

                        if (testBPP != bpp)
                        {
                            continue;
                        }

                        if ((testResX.AsInt() >= deskResX.AsInt()) || (testResY.AsInt() >= deskResY.AsInt()))
                        {
                            continue;
                        }
                        // This will work as our new resolution
                        resX = testResX;
                        resY = testResY;

                        console.warn("Warning: Switching to \"" + resX + " " + resY + " " + bpp + "\"");
                        break;
                    }
                }
            }
            sGlobal["$pref::Video::mode"] = resX + " " + resY + " " + fs + " " + bpp + " " + rate + " " + fsaa;

            string fsLabel = "";

            if (fs.AsInt() == 1 || fs == "true")
            {
                fsLabel = "Yes";
            }
            else
            {
                fsLabel = "No";
            }

            console.print("Accept Mode: \n" + "--Resolution    : " + resX + " " + resY + "\n" + "--Full Screen   : " + fsLabel + "\n" + "--Bits Per Pixel: " + bpp + "\n" + "--Refresh Rate  : " + rate + "\n" + "--FSAA Level    : " + fsaa + "\n" + "---------------------------");
            // Actually set the new video mode

            canvas.setVideoMode(resX, resY, fs, bpp, rate, fsaa);
            // FXAA piggybacks on the FSAA setting in $pref::Video::mode.

            coPostEffect FXAA_PostEffect = "FXAA_PostEffect";

            if (FXAA_PostEffect.isObject())
            {
                FXAA_PostEffect.isEnabled = fsaa.AsInt() > 0;
            }

            //if (console.isObject("FXAA_PostEffect"))
            //    new coPostEffect("FXAA_PostEffect")["isEnabled"] = (fsaa.AsInt() > 0 ? true.AsString() : false.AsString());

            if (bGlobal["$pref::Video::autoDetect"])
            {
                GraphicsQualityAutodetect();
            }
        }
        public void GammaPostFXsetShaderConsts(coPostEffect thisobj)
        {
            float clampedGamma = Util.mClamp(fGlobal["$pref::Video::Gamma"], (float)0.001, (float)2.2);

            thisobj.setShaderConst("$OneOverGamma", (1 / clampedGamma).AsString());
        }
Esempio n. 17
0
        public void dof_init1()
        {
            TorqueSingleton ts = new TorqueSingleton("PostEffect", "DOFPostEffect");

            ts.PropsAddString("renderTime", "PFXAfterBin");
            ts.PropsAddString("renderBin", "GlowBin");
            ts.Props.Add("renderPriority", "0.1");

            ts.Props.Add("shader", "PFX_DOFDownSampleShader");
            ts.Props.Add("stateBlock", "PFX_DOFDownSampleStateBlock");
            ts.PropsAddString("texture[0]", "$backBuffer");
            ts.PropsAddString("texture[1]", "#prepass");
            ts.PropsAddString("target", "#shrunk");
            ts.PropsAddString("targetScale", "0.25 0.25");

            ts.Props.Add("isEnabled", "false");
            coPostEffect DOFPostEffect = ts.Create();

            ts = new TorqueSingleton("PostEffect", "DOFBlurY");
            ts.Props.Add("shader", "PFX_DOFBlurYShader");
            ts.Props.Add("stateBlock", "PFX_DOFBlurStateBlock");
            ts.PropsAddString("texture[0]", "#shrunk");
            ts.PropsAddString("target", "$outTex");
            coPostEffect DOFBlurY = ts.Create();

            DOFPostEffect.add(DOFBlurY);


            ts = new TorqueSingleton("PostEffect", "DOFBlurX");
            ts.Props.Add("shader", "PFX_DOFBlurXShader");
            ts.Props.Add("stateBlock", "PFX_DOFBlurStateBlock");
            ts.PropsAddString("texture[0]", "$inTex");
            ts.PropsAddString("target", "#largeBlur");
            coPostEffect DOFBlurX = ts.Create();

            DOFPostEffect.add(DOFBlurX);

            ts = new TorqueSingleton("PostEffect", "DOFCalcCoC");
            ts.Props.Add("shader", "PFX_DOFCalcCoCShader");
            ts.Props.Add("stateBlock", "PFX_DOFCalcCoCStateBlock");
            ts.PropsAddString("texture[0]", "#shrunk");
            ts.PropsAddString("texture[1]", "#largeBlur");
            ts.PropsAddString("target", "$outTex");
            coPostEffect DOFCalcCoC = ts.Create();

            DOFPostEffect.add(DOFCalcCoC);


            ts = new TorqueSingleton("PostEffect", "DOFSmallBlur");
            ts.Props.Add("shader", "PFX_DOFSmallBlurShader");
            ts.Props.Add("stateBlock", "PFX_DefaultDOFStateBlock");
            ts.PropsAddString("texture[0]", "$inTex");
            ts.PropsAddString("target", "$outTex");
            coPostEffect DOFSmallBlur = ts.Create();

            DOFPostEffect.add(DOFSmallBlur);


            ts = new TorqueSingleton("PostEffect", "DOFFinalPFX");
            ts.Props.Add("shader", "PFX_DOFFinalShader");
            ts.Props.Add("stateBlock", "PFX_DOFFinalStateBlock");
            ts.PropsAddString("texture[0]", "$backBuffer");
            ts.PropsAddString("texture[1]", "$inTex");
            ts.PropsAddString("texture[2]", "#largeBlur");
            ts.PropsAddString("texture[3]", "#prepass");
            ts.PropsAddString("target", "$backBuffer");
            coPostEffect DOFFinalPFX = ts.Create();

            DOFPostEffect.add(DOFFinalPFX);
        }
Esempio n. 18
0
 public void LuminanceVisPostFXsetShaderConsts(coPostEffect thisobj)
 {
     thisobj.setShaderConst("$brightPassThreshold", sGlobal["$HDRPostFX::brightPassThreshold"]);
 }
Esempio n. 19
0
 public void DOFPostEffectsetFocalDist(coPostEffect thisobj, string dist)
 {
     thisobj["focalDist"] = dist;
 }
Esempio n. 20
0
 public void DOFPostEffectsetAutoFocus(coPostEffect thisobj, bool enabled)
 {
     thisobj["autoFocusEnabled"] = enabled.AsString();
 }
Esempio n. 21
0
        public void PostFXManagersettingsSetEnabled(string thisobj, string bEnablePostFX)
        {
            console.SetVar("$PostFXManager::PostFX::Enabled", bEnablePostFX);
            //if to enable the postFX, apply the ones that are enabled

            coPostEffect SSAOPostFx     = "SSAOPostFx";
            coPostEffect HDRPostFX      = "HDRPostFX";
            coPostEffect LightRayPostFX = "LightRayPostFX";
            coPostEffect DOFPostEffect  = "DOFPostEffect";

            if (bEnablePostFX.AsBool())
            {
                if (bGlobal["$PostFXManager::PostFX::EnableSSAO"])
                {
                    SSAOPostFx.enable();
                }
                else
                {
                    SSAOPostFx.disable();
                }

                if (bGlobal["$PostFXManager::PostFX::EnableHDR"])
                {
                    HDRPostFX.enable();
                }
                else
                {
                    HDRPostFX.disable();
                }

                if (bGlobal["$PostFXManager::PostFX::EnableLightRays"])
                {
                    LightRayPostFX.enable();
                }
                else
                {
                    LightRayPostFX.disable();
                }

                if (bGlobal["$PostFXManager::PostFX::EnableDOF"])
                {
                    DOFPostEffect.enable();
                }
                else
                {
                    DOFPostEffect.disable();
                }

                postVerbose("% - PostFX Manager - PostFX enabled");


                //console.Call("SSAOPostFx", bGlobal["$PostFXManager::PostFX::EnableSSAO"] ? "enable" : "disable");
                //console.Call("HDRPostFX", bGlobal["$PostFXManager::PostFX::EnableHDR"] ? "enable" : "disable");
                //console.Call("LightRayPostFX", bGlobal["$PostFXManager::PostFX::EnableLightRays"] ? "enable" : "disable");
                //console.Call("DOFPostEffect", bGlobal["$PostFXManager::PostFX::EnableDOF"] ? "enable" : "disable");
                //console.Call("postVerbose", new[] { "% - PostFX Manager - PostFX enabled" });
            }
            else
            {
                SSAOPostFx.disable();
                HDRPostFX.disable();
                LightRayPostFX.disable();
                DOFPostEffect.disable();
                postVerbose("% - PostFX Manager - PostFX disabled");
                //console.Call("SSAOPostFx", "disable");
                //console.Call("HDRPostFX", "disable");
                //console.Call("LightRayPostFX", "disable");
                //console.Call("DOFPostEffect", "disable");
                //console.Call("postVerbose", new[] { "% - PostFX Manager - PostFX disabled" });
            }
        }
Esempio n. 22
0
 public void ChromaticLensPostFXsetShaderConsts(coPostEffect posteffect)
 {
     posteffect.setShaderConst("$distCoeff", sGlobal["$CAPostFx::distCoeffecient"]);
     posteffect.setShaderConst("$cubeDistort", sGlobal["$CAPostFx::cubeDistortionFactor"]);
     posteffect.setShaderConst("$colorDistort", sGlobal["$CAPostFx::colorDistortionFactor"]);
 }
Esempio n. 23
0
 public void MLAAFxsetShaderConsts(coPostEffect thisobj)
 {
     thisobj.setShaderConst("$lumaCoefficients", thisobj["lumaCoefficients"]);
     thisobj.setShaderConst("$threshold", thisobj["threshold"]);
     thisobj.setShaderConst("$depthThreshold", thisobj["depthThreshold"]);
 }
Esempio n. 24
0
        public void LuminanceVisPostFXonDisabled(string thisobj)
        {
            coPostEffect HDRPostFX = "HDRPostFX";

            HDRPostFX["skip"] = false.AsString();
        }
Esempio n. 25
0
 public void SSAOPostFxonAdd(coPostEffect thisobj)
 {
     thisobj["wasVis"]  = "Uninitialized";
     thisobj["quality"] = "Uninitialized";
 }