Anti-alias the edges in the present pass #78
Labels
No labels
animation
audio
blocked
bug report
controversial
documentation
easy
feature request
hard
medium
multiplayer
physics
ui
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
elsie/liuverse#78
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Nothing in the renderer is multisampled: every target is created with
sample_count: 1and the pipelines useMultisampleState::default(). Everyroofline, path edge and avatar silhouette is therefore a staircase, and the
browser has
--render-scalepartly because weak GPUs are expected.Real MSAA on the HDR target is not portable:
Rgba16FloatneedsEXT_color_buffer_floatfor a multisampled attachment too, and that extension isalready the reason WebGL2 falls back to
Rgba8Unorm.Do it in the present pass instead. FXAA is five taps and works on the tonemapped
image, which is where its perceptual edge test belongs. The pass currently reads
with
textureLoad; FXAA needs a filtering sampler on the HDR texture, so add onealongside the existing
postbindings (and keep the integer path when it isoff).
Related: #77, #84, and the depth issue #88 if FXAA later
grows into a temporal filter.
Landed — as MSAA, not FXAA, and better than the plan assumed.
3cb2e12put 4x MSAA on the scene pass (multisampled HDR/color target, single-sample resolve the present pass samples) with a pause-menu switch;8f1290dadded 8x.max_msaa_samplesasks the adapter whether the chosen color format supports multisample resolve andsample_countbefore committing, so theRgba8UnormWebGL2 fallback path degrades to 1-sample rather than lying. MSAA is the default look;?msaa=0is the escape hatch for weak GPUs.edgefade in the shared fragment, so ribbon edges read as painted lines rather than staircases.The issue asked for AA in the present pass because MSAA looked unportable; it turned out portable with the adapter query. No FXAA was needed and none was added.