mirror of
https://github.com/4ian/GDevelop.git
synced 2026-10-12 02:01:17 +00:00
Add a TODO about the blending of semi-transparent pixels on layers with post-processing effects
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HdyuCYDD8w7U2Q3p1aHY5M
This commit is contained in:
@@ -599,6 +599,12 @@ namespace gdjs {
|
||||
outputPass.material.blendEquation = THREE.AddEquation;
|
||||
outputPass.material.blendSrc = THREE.OneFactor;
|
||||
outputPass.material.blendDst = THREE.OneMinusSrcAlphaFactor;
|
||||
// TODO: the composer blends transparency in linear space, unlike
|
||||
// rendering without post-processing (in sRGB space), and the output
|
||||
// pass converts premultiplied colors to sRGB. So semi-transparent
|
||||
// pixels can be brighter than without effects, especially over
|
||||
// the layers below. Fixing this needs a decision on which blending
|
||||
// to match, keeping the light added by a bloom on transparent pixels.
|
||||
this._threeFinalPasses.push(outputPass);
|
||||
for (const pass of this._threeFinalPasses) {
|
||||
this._threeEffectComposer.addPass(pass);
|
||||
|
||||
Reference in New Issue
Block a user