This repository has been archived on 2023-12-10. You can view files and clone it, but cannot push or open issues or pull requests.
PainterlyUNO/Matrix App/PregeneratedMods/effectors/Invert.cs

23 lines
641 B
C#
Raw Permalink Normal View History

using System.Windows.Forms;
using static Matrix_App.GifGeneratorUtils;
2021-06-09 16:43:27 +00:00
namespace Matrix_App.PregeneratedMods
{
2021-06-11 11:36:55 +00:00
public sealed class Invert : MatrixGifGenerator
2021-06-09 16:43:27 +00:00
{
protected override void ColorFragment(in int x, in int y, in float u, in float v, in int frame, out float r, out float g, out float b)
{
2021-06-11 11:36:55 +00:00
SampleFrame(actualStore!, frame, x, y, width, out float lr, out float lg, out float lb);
2021-06-09 16:43:27 +00:00
2021-06-11 11:36:55 +00:00
r = 1 - lr;
g = 1 - lg;
b = 1 - lb;
2021-06-09 16:43:27 +00:00
}
protected override void CreateUi(FlowLayoutPanel anchor, update invokeGenerator)
{
}
2021-06-09 16:43:27 +00:00
}
}