Hashed Alpha with Add Shader is broken #65593

Closed
opened 2019-06-07 09:28:52 +02:00 by Philip Holzmann · 7 comments

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
AlphaHashed.blend
Old render: AlphaHashed.old.png
Current (broken) render: AlphaHashed.new.png

**System Information** Operating system: Windows 10 64 bit Graphics card: Nvidia GTX {[F7091471](https://archive.blender.org/developer/F7091471/AlphaHashed.new.png)}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** [AlphaHashed.blend](https://archive.blender.org/developer/F7091439/AlphaHashed.blend) Old render: ![AlphaHashed.old.png](https://archive.blender.org/developer/F7091473/AlphaHashed.old.png) Current (broken) render: ![AlphaHashed.new.png](https://archive.blender.org/developer/F7091476/AlphaHashed.new.png)

Added subscriber: @Foaly

Added subscriber: @Foaly

Added subscriber: @tomjk

Added subscriber: @tomjk

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.

alphahash.png

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.

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. ![alphahash.png](https://archive.blender.org/developer/F7091824/alphahash.png) 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.

Added subscriber: @ZedDB

Added subscriber: @ZedDB
Clément Foucault was assigned by Sebastian Parborg 2019-06-14 12:12:40 +02:00

Seems like ff7401b02c is the commit that broke this.

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

Seems like ff7401b02c is the commit that broke this. But judging from the commit message this is an intended change perhaps?

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

I did not know this was valid under cycles.

I made the changes in ff7401b02c 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.

I did not know this was valid under cycles. I made the changes in ff7401b02c 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.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#65593
No description provided.