Skip to content

Model Data + Near Plane Dithering + Zone Reveal Fade#1010

Open
RuffledPlume wants to merge 8 commits into
117HD:masterfrom
RuffledPlume:DitherGeomNearPlane
Open

Model Data + Near Plane Dithering + Zone Reveal Fade#1010
RuffledPlume wants to merge 8 commits into
117HD:masterfrom
RuffledPlume:DitherGeomNearPlane

Conversation

@RuffledPlume
Copy link
Copy Markdown
Contributor

Uses ordered dithering to fade out geometry that is about to clip with the near plane

image image

Copy link
Copy Markdown
Member

@aHooder aHooder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me, but I think we should add a toggle for this, which removes the extra fragment input when disabled, so this performance difference is an opt-in thing:
image

@RuffledPlume RuffledPlume force-pushed the DitherGeomNearPlane branch from bc421e1 to 88d935c Compare May 9, 2026 13:47
@RuffledPlume RuffledPlume requested a review from aHooder May 9, 2026 13:50
@RuffledPlume RuffledPlume force-pushed the DitherGeomNearPlane branch 2 times, most recently from 5df2bdf to c7d1ced Compare May 14, 2026 11:03
@RuffledPlume RuffledPlume changed the title Dither out geom that is about the clip with the near plane Model Data + Near Plane Dithering + Zone Reveal Fade May 14, 2026
@RuffledPlume RuffledPlume force-pushed the DitherGeomNearPlane branch from efa530b to c3b9629 Compare May 16, 2026 19:26
RuffledPlume and others added 8 commits May 16, 2026 20:26
 * Created TextureBufferReader to simplify reading Buffers
 * Added texture_facees.glsl which proves a `getFaceData` which returns a struct

Use Macros to build the parser

Define the buffer to remove the need to pass it into each read func

Dont Align to texal size

underlying buffer will always be pow2, so even if its RGB or RGBA it'll fit correctly

Implemented ModelData

Both static & dynamic models can now sample data specific to that model

Ensure ModelDataSize is updated correctly

Write less data for models
 * Use FragDepth to calculate view depth
 * Optimise Bayer matrix, lookup table has initialisation cost
 * Implemented Interleaved Gradient Dithering
    * https://blog.demofox.org/2022/01/01/interleaved-gradient-noise-a-different-kind-of-low-discrepancy-sequence/
Instead of zone upload jobs being delayed to avoid random reveal, now use dithering to reveal them instead
@RuffledPlume RuffledPlume force-pushed the DitherGeomNearPlane branch from c3b9629 to 4618659 Compare May 16, 2026 19:29
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.

2 participants