Skip to content

Layered Weighted Order Independent Transparency - #1179

Open
RuffledPlume wants to merge 19 commits into
117HD:masterfrom
RuffledPlume:OIT
Open

RuffledPlume wants to merge 19 commits into
117HD:masterfrom
RuffledPlume:OIT

Conversation

@RuffledPlume

Copy link
Copy Markdown
Contributor
  • Removed Ebo Alpha Sorting
  • AlphaModels no longer need to pack faces
  • FacePrioritySorter no longer has AlphaModel Sort
  • zone RenderAlpha draws unsorted
  • zone AlphaModels now track alpha discard
    • Materials now need to be tagged as alpha discrd (IE: Leaves)
  • Added Three new passes
    • alphaDiscardPass - Draws Alpha with depth mask/testing enabled clipping alpha
    • alphaPrePass - to build the first layer of OIT
    • alphaPass - which writes to a layered OIT Buffer color accum & revealage
    • composite - reads the multiple layers and composites the alpha into the scene fbo
image

@RuffledPlume
RuffledPlume force-pushed the OIT branch 4 times, most recently from 5f59420 to d9ce71d Compare August 24, 2026 03:42
@RuffledPlume

Copy link
Copy Markdown
Contributor Author

Temporass Master VS PR
image

Temporass.OIT.mp4

@RuffledPlume
RuffledPlume force-pushed the OIT branch 8 times, most recently from d79c3e8 to 7a56900 Compare August 31, 2026 02:39
@RuffledPlume
RuffledPlume force-pushed the OIT branch 7 times, most recently from 8aed623 to 4ea4b93 Compare September 7, 2026 16:45
@RuffledPlume
RuffledPlume marked this pull request as ready for review September 7, 2026 16:47
@RuffledPlume
RuffledPlume force-pushed the OIT branch 2 times, most recently from a194c43 to 92dc7f5 Compare September 8, 2026 19:42
@RuffledPlume
RuffledPlume force-pushed the OIT branch 3 times, most recently from a293ff7 to 1b4207e Compare October 20, 2026 16:34
@RuffledPlume
RuffledPlume force-pushed the OIT branch 2 times, most recently from e68c5aa to 2776e9c Compare November 1, 2026 22:53
@RuffledPlume
RuffledPlume force-pushed the OIT branch 6 times, most recently from ab4b5a3 to 7e03e1d Compare November 4, 2026 22:47
 * Removed Ebo Alpha Sorting
 * AlphaModels no longer need to pack faces
 * FacePrioritySorter no longer has AlphaModel Sort
 * zone RenderAlpha draws unsorted
 * zone AlphaModels now track alpha discard
     * Materials now need to be tagged as alpha discrd (IE: Leaves)
 * Added Three new passes
    * alphaDiscardPass - Draws Alpha with depth mask/testing enabled clipping alpha
    *  alphaPrePass - to build the first layer of OIT
    *  alphaPass - which writes to a layered OIT Buffer color accum & revealage
    * composite - reads the multiple layers and composites the alpha into the scene fbo

eboAlpha isn't needed whilst OIT is in use

Alpha Discard Pass should always run

Fix Compile Error on Intel/MacOs

When using OIT Sort by DrawCall not by order

Added More timers to find where the additional cost is coming from on Mac

Fix BackBuffer Alpha Not getting cleared causing ghosting

When using OIT we don't need to requestTempAlphaModels

Only MultiLoc whilst using OIT when the zone isn't visible

Reduce Flush call count

Merge Scene Opaque Depth into the FirstLayer to reduce texelFetches

Auto Detect Alpha Mask Textured and mark Materials as AlphaDiscard

Also fixes AlphaMask textures IE (Leaves) from having its Alpha be blended due to Bicubic filtering, we perform nearest filtering then combine the scaled color & nearest alpha pixels together

Fix UBO prefixes and merge remainder of scene_common shader port

Move output_transform.glsl include inside fragment guard in scene_common

Render water with a WATER_PASS OIT transparent program in the OIT pipeline

Sync

Fix MacOS Alpha Ghosting due to BackBuffer having alpha channel

Removed Farthest Layer

Write Stencil where alpha has been drawn

This lets us to only run the composite pass where the stencil test passes
Merge MSAA Resolve into OIT Depth Merge

Refactor OIT Rendering out of ZoneRenderer & into OITRenderer

Render Shadows with sorted alpha when not using OIT

Enable Alpha Blending on Discard Pass

Added Transparency MSAA which defaults to matching Scene

Also combined first/farthest depth bounds

Fix Black Halo around Opaque when its infront of water

Cleanup/Improvements to OIT Writes

Fix OIT Drawing AlphaModels regardless of roof removal

Sync
Also added DEBUG_DUMP_TEXTURES which defaults to false
Black Haloing is now fixed by the flood fill, so we no longer need to blend alpha discarded pixels
Remove Discard; from OIT Alpha Program, since we can just initialise the outputs
Added TiledLight Plane Calculation to reject back face lights when a plane candidate is valid
AlphaDiscard needs to have a threshold of 0.5 to match MSAA Alpha Coverage

Refactored TiledLighting Culling & Plane Candidate calculations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant