Page MenuHome

Hashed Alpha with Add Shader is broken
Closed, InvalidPublic

Description

System Information
Operating system: Windows 10 64 bit
Graphics card: Nvidia GTX {F7091471}750 Ti

Blender Version
Broken: blender-2.80.0-git.aa003c73245f-windows64
Worked: blender-2.80.0-git.8d95dcd87dbb-windows64

Short description of error
Adding a Emission and Transparent Shader together with Hashed Alpha blending mode used to work fine.
Now the transparent part is black.

(I know the more sensible thing to do is setting the Blend Mode to Add for such a material. But that is not compatible with Depth-Of-Field, nor Cycles.)

Exact steps for others to reproduce the error


Old render:

Current (broken) render:

Details

Type
Bug

Event Timeline

tom k (tomjk) added a subscriber: tom k (tomjk).EditedJun 7 2019, 1:53 PM

Can confirm that it did once work, now has the black border.

Operating system: Linux-4.15.0-48-generic-x86_64-with-debian-stretch-sid 64 Bits,
Graphics card: GeForce GTX 750 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 384.130

I did notice that your first picture seems to have a very slight dark fringe/halo though (EDIT: Actually I think that's just me falling for an old illusion, disregard). Attached is a picture showing a quick modification that works with latest blender version, with your method in an older version for comparison.

With a bit of tweaking I think you could get it to look more-or-less identical. You would need to up the samples to clear the noise though.

I'd call that a workaround though, so this does look like a bug to me.

Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.

Seems like rBff7401b02c4b9e111c0632f33bf5b51fc63026f6 is the commit that broke this.

But judging from the commit message this is an intended change perhaps?

I did not know this was valid under cycles.

I made the changes in rBff7401b02c4b9e111c0632f33bf5b51fc63026f6 to make it work like cycles when only using an emission node which behaves like fully opaque.

This is a tricky case because hashed transparency has no way of adding light without covering the pixels behind it. So even if it worked in the past it was not working like in cycles.

I would just add this as a limitation of Eevee.

As for the workaround, this is the intended way of using transparency with emission. If you don't want to mask the background, use the additive blend mode (which is what cycles does with your node setup). There is no middle ground between the 2 options in Eevee.