Added DARKEN blendMode

This commit is contained in:
Collin Smith 2019-03-19 02:56:42 -07:00
parent e5bd6e55f0
commit 3acd1ab0c5
2 changed files with 7 additions and 0 deletions

View File

@ -90,6 +90,12 @@ void main() {
color.g = 0.0; color.g = 0.0;
color.b = 0.0; color.b = 0.0;
} }
// Same as 8, except darker
} else if (blendMode == 10) {
if (color.a > 0.0) {
color.rgb *= tint.rgb;
}
} }
vec3 colorRGB = pow(color.rgb, vec3(1.0 / gamma)); vec3 colorRGB = pow(color.rgb, vec3(1.0 / gamma));

View File

@ -16,4 +16,5 @@ public interface BlendMode {
int TINT_ID = 7; int TINT_ID = 7;
int BRIGHTEN = 8; int BRIGHTEN = 8;
int TINT_ID_RED = 9; int TINT_ID_RED = 9;
int DARKEN = 10;
} }