🔧 Fix straight alpha
This commit is contained in:
@@ -55,7 +55,7 @@ function math2D() {
|
||||
// compositing color values in the shader in the same way.
|
||||
function compositing() {
|
||||
return `
|
||||
vec4 blendOver(vec4 over, vec4 under) {
|
||||
vec4 alphaOver(vec4 under, vec4 over) {
|
||||
float alpha = over.a + under.a * (1.0 - over.a);
|
||||
return vec4((over.rgb * over.a + under.rgb * under.a * (1.0 - over.a)) / alpha, alpha);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user