summaryrefslogtreecommitdiffstats
path: root/src/main/java/dev/figboot/cuberender/state
diff options
context:
space:
mode:
authorLibravatar bigfoot547 <[email protected]>2024-06-16 01:29:43 -0500
committerLibravatar bigfoot547 <[email protected]>2024-06-16 01:29:43 -0500
commit625ddde31025f53b246ba3aaafebbba96aa21c9f (patch)
treefe2d87ad58aed1f64d151568d9fa522715815611 /src/main/java/dev/figboot/cuberender/state
parentreadme (diff)
add separate control window
Diffstat (limited to 'src/main/java/dev/figboot/cuberender/state')
-rw-r--r--src/main/java/dev/figboot/cuberender/state/BlendMode.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/dev/figboot/cuberender/state/BlendMode.java b/src/main/java/dev/figboot/cuberender/state/BlendMode.java
index 1c1acf4..9ea8d29 100644
--- a/src/main/java/dev/figboot/cuberender/state/BlendMode.java
+++ b/src/main/java/dev/figboot/cuberender/state/BlendMode.java
@@ -8,6 +8,13 @@ import lombok.RequiredArgsConstructor;
@Getter
public enum BlendMode {
DISABLE((inOutColor, prev) -> inOutColor.w = 1),
+ BINARY((inOutColor, prev) -> {
+ if (inOutColor.w < 0.5) {
+ inOutColor.copyFrom(prev);
+ } else {
+ inOutColor.w = 1;
+ }
+ }),
BLEND_OVER((inOutColor, prev) -> {
float pAlphaFactor = prev.w * (1 - inOutColor.w);
float aOut = inOutColor.w + pAlphaFactor;