31 return PPEConstants.VAR_TYPE_FLOAT;
34 override void Update(
float timeslice, out
Param p_total, out
bool setting_defaults,
int order)
36 super.Update(timeslice,p_total,setting_defaults,order);
38 int active_request_count = 0;
42 bool setting_value_zero =
false;
44 float float_value_temp = 0.0;
45 float float_value_default = 0.0;
46 float float_value_total = 0.0;
50 p_total =
new Param1<float>(0.0);
53 if (m_RequestMap.Count() > 0)
61 m_Parent.ParamUpdateRemove(m_ParameterIndex);
65 for (
int i = 0; i < m_RequestMap.Count(); i++ )
71 Error(
"Debug | PPEMatClassParameterFloat | req_data not found! | " +
this +
" | mat/par: " + m_MaterialIndex +
"/" + m_ParameterIndex);
75 setting_value_zero = req_data.IsSettingDefaultValues();
77 if (setting_value_zero && !req_data.GetUpdatingDataValues() && !req_data.IsDataActive())
83 if (setting_value_zero)
85 req_data.m_FloatTarget = 0;
90 active_request_count++;
95 req_data.m_FloatLast = req_data.m_FloatCurrent;
97 if (!req_data.GetUpdatingDataValues() && req_data.IsDataActive())
99 float_value_temp = req_data.m_FloatCurrent;
100 PrepareLayerInfo(req_data.GetPriorityLayer(),float_value_temp,req_data.GetInteractionMask());
105 float_value_temp = req_data.m_FloatTarget;
108 req_data.SetUpdatingDataValues(
false);
109 if (setting_value_zero)
111 req_data.SetDataActive(
false);
116 float_value_temp = req_data.m_FloatTarget;
117 PrepareLayerInfo(req_data.GetPriorityLayer(),float_value_temp,req_data.GetInteractionMask());
120 req_data.m_FloatCurrent = float_value_temp;
127 bool override_active =
false;
135 float_value_default = float_value_total;
139 if ( override_active )
142 value =
m_LayerInfo.Get(m_CommandLayersArray.Get(i)).Get(LAYER_INFO_VALUE);
143 operator =
m_LayerInfo.Get(m_CommandLayersArray.Get(i)).Get(LAYER_INFO_OPERATOR);
148 float_value_total =
Math.Min(float_value_total,value);
152 float_value_total =
Math.Max(float_value_total,value);
157 float_value_total = float_value_total + value;
161 float_value_total = (1 - float_value_total) * value + float_value_total;
166 float_value_total = float_value_total - value;
170 float_value_total = float_value_total - value * float_value_total;
175 float_value_total = value - float_value_total;
179 float_value_total = value * float_value_total - float_value_total;
184 float_value_total = float_value_total * value;
188 float_value_total = value;
192 float_value_total = value;
197 float_value_total =
Math.Clamp(float_value_total,0,1);
202 override_active =
true;
208 m_CommandLayersArray.Clear();
211 if (active_request_count == 0)
218 Param1<float>.Cast(p_total).param1 = res;
222 m_Parent.ParamUpdateRemove(m_ParameterIndex);
224 m_CurrentValues = p_total;
230 AddPriorityInfo(layer);
237 m_CurrentValues = p_total;
247 m_Dependencies.Set(
PostProcessEffectType.Glow,{PPEGlow.PARAM_COLORIZATIONCOLOR, PPEGlow.PARAM_OVERLAYCOLOR});