Add Screen blend mode.
This commit is contained in:
parent
7356b727c3
commit
ccb946e65d
@ -176,7 +176,14 @@ public class RenderState implements Cloneable, Savable {
|
|||||||
* <p>
|
* <p>
|
||||||
* Result = 2 * Source Color * Dest Color -> (GL_DST_COLOR, GL_SRC_COLOR)
|
* Result = 2 * Source Color * Dest Color -> (GL_DST_COLOR, GL_SRC_COLOR)
|
||||||
*/
|
*/
|
||||||
ModulateX2
|
ModulateX2,
|
||||||
|
/**
|
||||||
|
* Opposite effect of Modulate/Multiply. Invert both colors, multiply and
|
||||||
|
* then invert the result.
|
||||||
|
* <p>
|
||||||
|
* Result = 2 * Source Color * Dest Color -> (GL_ONE, GL_ONE_MINUS_SRC_COLOR)
|
||||||
|
*/
|
||||||
|
Screen
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -647,6 +647,9 @@ public class LwjglRenderer implements Renderer {
|
|||||||
case ModulateX2:
|
case ModulateX2:
|
||||||
glBlendFunc(GL_DST_COLOR, GL_SRC_COLOR);
|
glBlendFunc(GL_DST_COLOR, GL_SRC_COLOR);
|
||||||
break;
|
break;
|
||||||
|
case Screen:
|
||||||
|
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new UnsupportedOperationException("Unrecognized blend mode: "
|
throw new UnsupportedOperationException("Unrecognized blend mode: "
|
||||||
+ state.getBlendMode());
|
+ state.getBlendMode());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user