Page MenuHome

EEVEE Film transparent not working
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Linux-5.4.0-42-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: GeForce RTX 2080 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.100

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-08-05 18:06, hash: rB854f73b4a231
Worked: b1bfcf9f6bc2^
Caused by rBda741013a1e1: EEVEE: GLSL refactor/cleanup

Short description of error
The render setting film-transparent option gives a black opaque background color as a result. It should be alpha in the backgound.

Exact steps for others to reproduce the error
Default file just enable transparent option under film with EEVEE and hit F12. You should see the default cube with the alpha background but you get a black opaque BG color instead.

Event Timeline

Evan Wilson (EAW) changed the task status from Needs Triage to Confirmed.EditedAug 5 2020, 10:32 PM

I can confirm using version: 2.91.0 Alpha, branch: master, commit date: 2020-08-05 13:59, hash: 2ca006f6c179, type: Release

IIRC, it has been like this for a few days, and I haven't gotten around to reporting it myself.

Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 470/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 391.35

Edit: My debug build from 2 days ago also shows this issue. 2.91.0 Alpha, branch: master, commit date: 2020-08-03 01:44, hash: rBb5dcf746369e: Cycles: add support for rendering deformation motion blur from Alembic caches.

Evan Wilson (EAW) triaged this task as High priority.Aug 5 2020, 10:33 PM

I think this is for you @Clément Foucault (fclem) the first commit that compiles and appears to have this problem is rBb1bfcf9f6bc2ec25c6d80e7ba3b163d887ef01d8

Can reproduce, and can confirm also.

Testing some code, seems like when drawing the world background doesn't take into account the alpha

diff --git a/source/blender/draw/engines/eevee/shaders/surface_frag.glsl b/source/blender/draw/engines/eevee/shaders/surface_frag.glsl
index e746acfdfa3..099b8039d95 100644
--- a/source/blender/draw/engines/eevee/shaders/surface_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/surface_frag.glsl
@@ -47,7 +47,7 @@ void main()
   outRadiance = vec4(cl.radiance, alpha * holdout);
   outTransmittance = vec4(cl.transmittance, transmit) * holdout;
 #else
-  outRadiance = vec4(cl.radiance, holdout);
+  outRadiance = vec4(cl.radiance, alpha * holdout);
   ssrNormals = cl.ssr_normal;
   ssrData = cl.ssr_data;
 #  ifdef USE_SSS

Seems to fix it. Still there are issues with holdout rendering. it seems to be different as it doesn't create complete black holdouts.

Render from Viewport is working. But it is not working with passes or nodes in the compositor either.