blend lol
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user