Codename LogoCodename Logo

funkin.backend.shaders.OverlayShader

APIWiki

Constructor

View in GitHub

@:glFragmentSource("\r\n#pragma header\r\nuniform vec4 uBlendColor;\r\n\r\nvec3 blendLighten(base:Vec3, blend:Vec3) : Vec3 {\r\n\treturn mix(\r\n\t\t1.0 - 2.0 * (1.0 - base) * (1.0 - blend),\r\n\t\t2.0 * base * blend,\r\n\t\tstep( base, vec3(0.5) )\r\n\t);\r\n}\r\n\r\nvec4 blendLighten(vec4 base, vec4 blend, float opacity)\r\n{\r\n\treturn (blendLighten(base, blend) * opacity + base * (1.0 - opacity));\r\n}\r\n\r\nvoid main()\r\n{\r\n\tvec4 base = texture2D(bitmap, openfl_TextureCoordv);\r\n\tgl_FragColor = blendLighten(base, uBlendColor, uBlendColor.a);\r\n}")new()

Variables

@:keepuBlendColor:ShaderParameter_Float