Preload PostProcess and only disable

Create / destroy cause some weird effects especially for Alcohol
PostProcess
This commit is contained in:
He-Man 2018-05-01 14:31:59 +02:00
parent e2d214b59a
commit 7ba61ea46c
2 changed files with 15 additions and 13 deletions

View File

@ -24,19 +24,21 @@ private ["_priority","_wd","_db"];
params [["_level",0,[0]],["_speed",0,[0]]];
if (isNil "rmx_var_drunkHandles") then {
_priority = 15;
_wd = ["wetdistortion",_priority] call epoch_postProcessCreate;
_db = ["dynamicBlur",_priority] call epoch_postProcessCreate;
rmx_var_drunkHandles = [_wd,_db];
// Preload defaults
[(rmx_var_drunkHandles select 0), 0, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]] call epoch_postprocessAdjust;
[(rmx_var_drunkHandles select 1), 0, [0]] call epoch_postprocessAdjust;
};
switch _level do {
case 0:
{
rmx_var_drunkHandles call epoch_postprocessDestroy;
rmx_var_drunkHandles = nil;
(rmx_var_drunkHandles select 0) ppEffectEnable false;
(rmx_var_drunkHandles select 1) ppEffectEnable false;
};
case 0.1:
{

View File

@ -25,25 +25,25 @@ private ["_cc","_ci","_fg","_priority"];
params [["_level",0,[0]],["_speed",0,[0]] ];
if (isNil "rmx_var_RadiationHandles") then {
_priority = 16;
_fg = ["filmGrain",_priority] call epoch_postProcessCreate;
_cc = ["colorCorrections",_priority] call epoch_postProcessCreate;
_ci = ["colorInversion",_priority] call epoch_postProcessCreate;
rmx_var_RadiationHandles = [_fg,_cc,_ci];
// Preload defaults
[(rmx_var_RadiationHandles select 0), 0, [0.005,1.25,2.01,0.75,1.0,true]] call epoch_postprocessAdjust;
[(rmx_var_RadiationHandles select 1), 0, [1,1,0,[0,0,0,0],[1,1,1,1],[0.299,0.587,0.114,0],[-1,-1,0,0,0,0,0]]] call epoch_postprocessAdjust;
[(rmx_var_RadiationHandles select 2), 0, [0,0,0]] call epoch_postprocessAdjust;
};
switch _level do {
case 0:
{
rmx_var_RadiationHandles call epoch_postprocessDestroy;
rmx_var_RadiationHandles = nil;
};
case 0;
case 0.1:
{
rmx_var_RadiationHandles call epoch_postprocessDestroy;
rmx_var_RadiationHandles = nil;
(rmx_var_RadiationHandles select 0) ppEffectEnable false;
(rmx_var_RadiationHandles select 1) ppEffectEnable false;
(rmx_var_RadiationHandles select 2) ppEffectEnable false;
};
case 0.2:
{