Skip to content

Commit

Permalink
Fix a couple of blending styles
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Jan 30, 2025
1 parent b1e9550 commit 64fb0d2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions xLights/effects/ispc/LayerBlendingFunctions.ispc
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ export void Unmask2Function(uniform const LayerBlendingData &data,
uniform uint32 result[],
const uniform uint32 src[],
const uniform uint32 indexes[]) {

foreach (index = data.startNode...data.endNode) {
uint32 fg = src[index];
if (!data.isChromaKey || !applyChroma(data, fg)) {
Expand All @@ -607,8 +608,7 @@ export void Unmask2Function(uniform const LayerBlendingData &data,
HSVColor hsv0 = toHSV(fg);
// if effect 2 is non black
hsv0.z = hsv1.z;
fromHSV(hsv0, bg);
result[index] = bg;
result[index] = fromHSV(hsv0);
} else {
result[index] = BLACK_COLOR;
}
Expand Down Expand Up @@ -668,8 +668,7 @@ export void Shadow_1on2Function(uniform const LayerBlendingData &data,
}
// hsv1.value = hsv0.value;
// hsv1.saturation = hsv0.saturation;
fromHSV(hsv1, bg);
result[index] = bg;
result[index] = fromHSV(hsv1);
}
}
}
Expand All @@ -688,8 +687,7 @@ export void Shadow_2on1Function(uniform const LayerBlendingData &data,
if (hsv1.z > 0.0) {
hsv0.x = hsv0.x + (hsv1.z * (hsv0.x - hsv1.x)) / 2.0;
}
fromHSV(hsv0, bg);
result[index] = bg;
result[index] = fromHSV(hsv0);
}
}
}
Expand Down

0 comments on commit 64fb0d2

Please sign in to comment.