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 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()); }
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"]); }