Page MenuHome

Workbench: Solid Wireframe Transparency
Changes PlannedPublic

Authored by Jeroen Bakker (jbakker) on Oct 15 2019, 9:52 AM.

Details

Summary

This patch will show the background camera images behind a solid
wireframe.

The change consist out of selecting the correct texture for viewport compositing
so it has an alpha channel to write to. And a alpha under wire blending mode.

During development we needed to make a decision about what render
artifacts to allow as the blending modes as we actually needed an
blending mode to blend over the background, but blend under the wires.

In order to fix these render artifacts we can introduce a shader, but
that will require copies of the depth and color buffers.

Diff Detail

Repository
rB Blender
Branch
T57739 (branched from master)
Build Status
Buildable 5367
Build 5367: arc lint + arc unit

Event Timeline

source/blender/draw/engines/workbench/workbench_forward.c
420

make local var for readability

source/blender/draw/intern/DRW_render.h
346

Use BLEND_CUSTOM

Jeroen Bakker (jbakker) planned changes to this revision.Wed, Nov 27, 3:01 PM

TODO: Remove the blend type and use DRW_STATE_BLEND_CUSTOM where the first output is added to the result buffer and the second is multiplied on top.
https://www.khronos.org/opengl/wiki/Blending#Dual_Source_Blending

Also wait for the overlay uniformication patch