Fix blend modes in Container rendering.

This commit is contained in:
Ben Richards 2024-07-04 17:44:35 +12:00
parent b963f148a6
commit bc30f4a9f7
2 changed files with 8 additions and 1 deletions

View file

@ -122,7 +122,7 @@ var ContainerWebGLRenderer = function (renderer, container, drawingContext, pare
child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);
// Render
child.renderWebGL(renderer, child, drawingContext, transformMatrix, container);
child.renderWebGL(renderer, child, currentContext, transformMatrix, container);
// Restore original values
@ -133,6 +133,12 @@ var ContainerWebGLRenderer = function (renderer, container, drawingContext, pare
// TODO: Child Mask handling (end)
}
// Release any remaining context.
if (currentContext !== drawingContext)
{
currentContext.release();
}
// TODO: Container PostFX handling
};

View file

@ -104,6 +104,7 @@ var LayerWebGLRenderer = function (renderer, layer, drawingContext)
// TODO: Child Mask handling (end)
}
// Release any remaining context.
if (currentContext !== drawingContext)
{
currentContext.release();