WIP: scene: far heightfield mesh tier with view-depth haze (style 'mesh') #23
Closed
nibu
wants to merge 1 commit from
nibu/ridge-mesh-haze into nibu/ridge-scene
pull from: nibu/ridge-mesh-haze
merge into: GameCult:nibu/ridge-scene
GameCult:main
GameCult:dev
GameCult:void/file-readers-store
GameCult:void/file-receipts-anywhere
GameCult:void/config-ridge
GameCult:void/night-band-preview
GameCult:void/file-zone-contract
GameCult:void/config-live
GameCult:void/pose-size-docs
GameCult:void/browse-key-screen-class
GameCult:void/fork-raised-at
GameCult:void/nibu-ridge-face-volume
GameCult:void/unread-icon-quiet
GameCult:void/nav-ink
GameCult:void/mind-media-row
GameCult:void/nav-quiet
GameCult:void/mind-desk-pin
GameCult:void/rename-docs
GameCult:void/nav-gutter
GameCult:void/scene-tier-full
GameCult:void/default-homeserver-chat
GameCult:void/sentiment-pose
GameCult:void/registration-https-only
GameCult:void/register-entry
GameCult:void/default-homeserver-gamecult
GameCult:void/albums-slice-1-r2
GameCult:nibu/scene-throw-compile-fail
GameCult:void/desk-order-count
GameCult:void/desk-fork-contract
GameCult:void/reply-preview-bound
GameCult:void/reply-preview-bounds
GameCult:nibu/ridge-heightfield
GameCult:void/desk-slice-1
GameCult:void/phone-contrast-taps
GameCult:void/demo-homeserver-unreachable
GameCult:void/publish-dev-preview
GameCult:void/mind-feedback-pages-spec
GameCult:void/scene-css-function-export
GameCult:void/dings-v4
GameCult:void/scene-ink
GameCult:void/newcomer-signin-errors
GameCult:void/dings-v3
GameCult:void/pose-in-bubble
GameCult:release/dev-64edacac
GameCult:void/browse-collapse
GameCult:void/albums-slice-1
GameCult:nemesis/demo
GameCult:void/nemesis-demo-tests
GameCult:nibu/terrain-hatching
GameCult:void/navigator-s8-lows
GameCult:void/footer-lows-3
GameCult:void/footer-lows-2
GameCult:void/footer-lows
GameCult:void/auth-footer-tint
GameCult:nibu/dusk-sky-floor
GameCult:void/scene-midbuild-msg
GameCult:void/scene-midbuild-sweep
GameCult:void/scene-midbuild-test
GameCult:void/scene-test-strength
GameCult:void/sky-link-readability
GameCult:void/training-notice-comment
GameCult:void/ci-no-artifact-upload
GameCult:nibu/scene-terrain-scatter-dev
GameCult:void/room-list-plain-rows
GameCult:void/room-menu-name-chip-fix
GameCult:void/ci-runner-label
GameCult:void/text-flow-footer
GameCult:void/settings-without-window
GameCult:void/dings-hook
GameCult:void/upload-error-diagnostics
GameCult:void/file-zone-design
GameCult:void/rat-dev-cleanups
GameCult:nibu/scene-terrain-scatter
GameCult:void/text-flow-leftovers
GameCult:nibu/scene-terrain-both
GameCult:void/sky-tokens
GameCult:nibu/scene-terrain-stars
GameCult:nibu/scene-terrain-albedo
GameCult:void/terrain-demo
GameCult:nibu/scene-terrain-atmosphere
GameCult:void/ridge-scene-and-bubbles
GameCult:void/poses-readme
GameCult:void/preview-demo
GameCult:void/rat-dev-workflow
GameCult:void/preview-all
GameCult:nibu/scene-host
GameCult:nibu/terrain-tier-spike
GameCult:void/ci-drop-cinny-leftovers
GameCult:void/login-training-notice
GameCult:nibu/ridge-scene
GameCult:void/sky-sun
GameCult:void/ratatoskr-sky-palette
GameCult:void/brand-ratatoskr
GameCult:void/three-doors-look
GameCult:nibu/voxel-scene
GameCult:ratatoskr/estate-navigator
GameCult:void/composer-spellcheck
GameCult:nibu/scene-trace-prepass
GameCult:void/brand
GameCult:void/pose-catalogue
GameCult:void/resume-sync
GameCult:void/soundscape-human-subset
GameCult:void/soundscape-audio-socket
GameCult:void/pose-bubble
GameCult:hands/estate-h8
GameCult:ratatoskr/file-zone-map
GameCult:hands/estate-h7
GameCult:ratatoskr/research-atmosphere
GameCult:void/gamecult-theme-and-project-nav
GameCult:replace-matrix-js-sdk
GameCult:dependabot/docker/nginx-1.31.8-alpine
GameCult:kfiven-patch-3
GameCult:release-v4.12.8
GameCult:renovate/npm-sanitize-html-vulnerability
GameCult:dependabot/github_actions/actions/upload-artifact-7.0.2
GameCult:kfiven-patch-2
GameCult:dependabot/github_actions/dawidd6/action-download-artifact-27
GameCult:dependabot/github_actions/docker/setup-buildx-action-4.4.1
GameCult:dependabot/github_actions/docker/setup-qemu-action-4.4.0
GameCult:dependabot/github_actions/docker/build-push-action-7.4.0
GameCult:kfiven-patch-1
GameCult:release-v4.12.6
GameCult:release-v4.12.3
GameCult:release-v4.12.2
GameCult:more-theme
GameCult:fix-257
GameCult:imporve-thread-reply
GameCult:revert-2402-improve-menu-congestion
GameCult:mxidColor-toggle
GameCult:update-sw-main-msg
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
GameCult/Ratatoskr!23
Loading…
Reference in a new issue
No description provided.
Delete branch "nibu/ridge-mesh-haze"
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?
Stacked on
nibu/ridge-scene(PR #21's branch, untouched). Draft, merge nothing.What. A third scene style,
backgroundScene.style: 'mesh'. One WebGL pass: gradient sky, then a 3840-triangle low-poly heightfield (96x20 quads, 2037 vertices, rows 6..150 units from a fixed camera). Fragment haze from view-space depth (the projection's w):T = exp(-3 d / 150),colour = T*base + (1-T)*hazeColour(skyColours()), chroma drops by0.45 (1-T). No ray march, no second sun, no new colour source. Tier flag still defaults off;sun.js, theme tokens and chat UI untouched.Comparison.
createRidgeScene({ rowHaze: true })(default off): inside each baked layer the crest is hazier than the foot, as if the screen row were depth.Preview. https://minds.gamecult.org/nibu/ratatoskr-ridge-mesh-haze-3273293f/?style=mesh&probe=1 (also
&tier=low|still,?rowhaze=1, no style for the baked ridges). Screenshots in/shots/.Tests.
src/app/features/scene: 123 pass (ridge, raymarch and tier tests unchanged and green). New:meshWorld.test.ts(triangle bound, index range, periodic seam, haze formula, desaturation, row-haze ordering),Mesh.test.ts(fake GL: null paths, one indexed draw of 3840 tris, still, slow-cadence fallback, hidden tab, dispose, style routing). The tests caught two real bugs before commit (normals facing down, pitch sign).tscshows no errors in the new files.Timings, honest. Headless Chromium, SwiftShader (CPU rasteriser) on a shared 16-core box at load average ~40, so these are an upper-bound feel, not a GPU number. Triangle count 3840. rAF p95 with
?probe=1at 960x540: 24 of 25 mesh/ridge runs held 16.7 ms median and 16.7-16.8 ms p95; one baked-rowhaze run tripped the 33 ms still fallback under load. Per-frame draw (mesh draw plus sync readback) median / p95: 960x540 full 10.8 / 26.9 ms, low (0.75x) 7.1 / 19.2 ms; 1920x1080 full 45.4 / 71.7 ms, low 25.7 / 46.3 ms. It is fill-rate bound in software (cost scales with pixels), so on a software renderer at 1080p the cadence guard drops it to a still. The Redmi is unmeasured; so is any real GPU.Known. Mesh style uses WebGL1/2
getContext('webgl'), so it needs a context where the ridge style needs none. Compile failures arrive as a structuralShaderCompileError(stage'vertex', the log names the shader) to avoid importing the ray-march chunk. Look is a first pass: crest silhouettes are flat-ish at the far edge. Existing eslint noise inridge/is not touched.🤖 Generated with Claude Code
Closed: draft exploration stacked on the dead #21 base. Branch nibu/ridge-mesh-haze is kept; reopen on dev if the mesh tier is wanted.
Pull request closed