Skip to content

Commit

Permalink
Use both factors for expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed Mar 20, 2024
1 parent e488940 commit d6fb869
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions nvidia-move-filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,8 @@ static bool nv_move_action_get_float(struct nvidia_move_info *filter,
if (action->feature_property == FEATURE_EXPRESSION_SINGLE) {
success = get_expression_value(
filter, action->feature_number[0], &value);
if (success)
value *= action->factor;
} else if (action->feature_property !=
FEATURE_EXPRESSION_VECTOR) {
float a = 0.0f;
Expand All @@ -511,6 +513,8 @@ static bool nv_move_action_get_float(struct nvidia_move_info *filter,
get_expression_value(
filter, action->feature_number[1], &b);
if (success) {
a *= action->factor;
b *= action->factor2;
if (action->feature_property ==
FEATURE_EXPRESSION_ADD) {
value = a + b;
Expand Down Expand Up @@ -711,8 +715,8 @@ static bool nv_move_action_get_float(struct nvidia_move_info *filter,
success = true;
}
}

value *= action->factor;
if (action->feature != FEATURE_EXPRESSION)
value *= action->factor;
value += action->diff;
if (success && easing) {
value = action->previous_float * action->easing +
Expand Down Expand Up @@ -2968,10 +2972,10 @@ static void nv_move_render(void *data, gs_effect_t *effect)
gs_texrender_reset(filter->render);
}

//if (!filter->render) {
// obs_source_skip_video_filter(filter->context);
// return;
//}
if (!filter->render) {
obs_source_skip_video_filter(filter->source);
return;
}

gs_blend_state_push();
gs_blend_function(GS_BLEND_ONE, GS_BLEND_ZERO);
Expand Down

0 comments on commit d6fb869

Please sign in to comment.