mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-28 15:57:42 +00:00
blend lol
This commit is contained in:
parent
5baae3ad58
commit
d1871761d9
|
@ -35,7 +35,11 @@ class OverlayBlend extends FlxShader
|
|||
|
||||
vec4 blendOverlay(vec4 base, vec4 blend)
|
||||
{
|
||||
return mix(1.0 - 2.0 * (1.0 - base) * (1.0 - blend), 2.0 * base * blend, step(base, vec4(0.5)));
|
||||
vec4 mixed = mix(1.0 - 2.0 * (1.0 - base) * (1.0 - blend), 2.0 * base * blend, step(base, vec4(0.5)));
|
||||
|
||||
// mixed = mix(mixed, blend, base.a); // proper alpha mixing
|
||||
|
||||
return mixed;
|
||||
}
|
||||
|
||||
void main()
|
||||
|
@ -48,7 +52,7 @@ class OverlayBlend extends FlxShader
|
|||
vec4 gf = flixel_texture2D(funnyShit, openfl_TextureCoordv.xy + vec2(0.1, 0.2));
|
||||
|
||||
|
||||
vec4 mixedCol = blendOverlay(gf, color);
|
||||
vec4 mixedCol = blendOverlay(color, gf);
|
||||
|
||||
gl_FragColor = mixedCol;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue