Project

General

Profile

Feature #15

Order Independent Transparency

Added by Leszek Koltunski about 3 years ago. Updated 6 months ago.

Status:
In Progress
Priority:
High
Start date:
06/17/2016
Due date:
% Done:

90%


Description

Alphablend is broken - it always takes into account the order with which we draw; thus if we are drawing a DistortedCubes target and happen to rotate it in a way that the Surfaces behind are drawn after the Surfaces in front, stuff looks weird.

Also visible if a large distortion comes out of a DistortedBitmap target.

http://stackoverflow.com/questions/28153207/opengl-alphablending-surface-with-itself


Related issues

Related to Bug #29: Postprocessed surface incorrectly merged Closed 04/08/2018
Blocked by Bug #31: various issues with OIT branch on Mali GPU Closed 05/30/2018

History

#1 Updated by Leszek Koltunski almost 2 years ago

Currently reading some scientific papers (see the open source 3D engine 'guacamole'!) on how to implement this.

#2 Updated by Leszek Koltunski over 1 year ago

  • Tracker changed from Bug to Feature
  • Subject changed from Surfaces sometimes drawn partially obstructed by Surfaces behind to Order Independent Transparency

We need to implement correct drawing of partially-transparent meshes. (currently, if the mesh self-obstructs, results on the screen depend on the order fragments get drawn).

#3 Updated by Leszek Koltunski over 1 year ago

  • Status changed from New to In Progress

Blocks #7.

Currently studying theory. ( 'guacamole' rendering system, https://github.com/vrsys/guacamole )

#4 Updated by Leszek Koltunski over 1 year ago

  • Assignee set to Leszek Koltunski

#5 Updated by Leszek Koltunski about 1 year ago

Commit examples|664a0e45 adds an application checking this feature.

#6 Updated by Leszek Koltunski about 1 year ago

Algorithm outlined in 'Per-Pixel Lists for Single Pass A-buffer' (Sylvain Lefebvre, Samuel Hornus, Anass Lasram) - specifically the 'insert_prelin_cas32' way from its implementations.fp will be ported.

This will need to be implemented in 2 places:

- DistortedNode.draw() when we render a single mesh
- the 'Blit with depth' phase when we merge postprocessed surfaces

#7 Updated by Leszek Koltunski about 1 year ago

  • % Done changed from 0 to 20

Theory understood, app checking functionality written. 20%.

#8 Updated by Leszek Koltunski about 1 year ago

  • Related to Bug #29: Postprocessed surface incorrectly merged added

#9 Updated by Leszek Koltunski about 1 year ago

  • % Done changed from 20 to 70

OIT branch fully implemented and working, at least on Adremo GPUs.

#10 Updated by Leszek Koltunski about 1 year ago

  • Blocked by Bug #31: various issues with OIT branch on Mali GPU added

#11 Updated by Leszek Koltunski 12 months ago

  • % Done changed from 70 to 90

Issue almost finished. Commit 6544040f makes non-postprocessed OIT work. Remaining stuff to be done:

1) Confirm that the issues with OIT on Mali T880 is indeed gone on driver r22
2) Somehow resolve the situation with PowerVR GE8*** compiler whose version 1.8 fails to compile OIT pass2 'build' and pass4 'render' shaders
3) Make the size of the SSBO adjustable (currently stuck at 8MB)

#12 Updated by Leszek Koltunski 6 months ago

SSBO is adjustable now. This leaves two things:

1) PowerVR shader compiler situation: even the latest update to the system still keeps the old driver, unable to confirm.
2) Mali: ditto, stuck with r12.

Also available in: Atom PDF