Debug dense grass GPU cost near Newland (known issue 238)
Investigate https://git.project-rk.com/prk/spiritech-known-issues/issues/238 and original intake https://git.project-rk.com/prk/player-bug-intake/issues/984. Report: dense grass outside Newland causes poor performance/high GPU load/fan noise on RX 6600 XT at 1440p/165 Hz, default settings; disabling shadows or AO reduces load substantially, AO reportedly Off by default. Reporter suspects full lighting before alpha rejection; this is a hypothesis, not measured evidence. Intake has no attachments, exact coordinates, build ID, timings or profiler captures. Scope: trace grass generation/submission, fragment coverage rejection, depth ordering, shadows and AO; reproduce with a controlled baseline before claiming a cause or improvement. Preserve visual quality and avoid arbitrary density/lighting reductions. Related completed Newland profiling (tsk_szb637np68) concerns older CPU transparent-submission costs and is not proof of this GPU symptom. No client launch/restart without agreement. Acceptance: establish a reproducible defect and measured cause, implement a design-level fix with a failing regression where applicable and validate against the unchanged baseline. If reproduction requires user data, record precise missing evidence and blocker rather than claiming a fix. Verified source findings at develop 630be6366 (clean working tree): grass_fragment.glsl main rejects faded/alpha<0.5 texels before shadows/local lights/probes/AO/fog. shader_fragment.glsl and transparency_shader_fragment.glsl also reject alpha/invisible coverage before lighting. This contradicts the proposed source-level late-alpha-test cause; actual hardware execution/performance is unmeasured. GrassTerrainRenderer creates nonblended, alpha-tested, two-sided generated grass with ShadowCaster=false; ShadowRenderer.RecordCasters explicitly skips it. Visible generated grass still receives cascaded shadows (four comparison samples per evaluated cascade, potentially two cascades at blends), body shadows and optional AO. DrawStreamBuilder sorts opaque batches nearest first; individual cards in GrassTuftMesh remain grid ordered, not view-depth ordered. Ordinary depth testing/writing is enabled; do not equate early alpha rejection with guaranteed early hardware depth rejection or zero overdraw. Imported grass is a separate path: WorldMaterialFactory selects a translucent shader for authored Blend materials, retains authored depth/blend semantics and sets GroundCover for recognized grass textures. That transparent shader samples local/probe lighting but does not evaluate AO/cascaded/body shadows in main. It is excluded from AO geometry by shader support/pass selection. Generated grass does enter AO's separate depth/normal prepass and then the lit scene; AO geometry uses the same alpha rejection, not full lighting. AO default is Off. Thus AO cannot explain the reported AO-Off baseline on its own, and imported versus generated contributions must be separated by a real capture. Recent-fix audit: fetched origin successfully; develop remains 630be6366. Checked merged history, all 16 current open engines PR titles, and both issue comment threads. No grass/shadow/AO/draw-stream changes after the original intake (2026-11-01; known issue created Nov 2), no linked fix or successful retest. Closest merged improvements predate the report: #2663 (Oct 14, 5106d8832) culls/fades distant placed grass; #2848 (Oct 25, 8f373a2ca) changes local lighting to clustered forward. #2650 (Oct 13) includes foliage AO optimization. These do not establish resolution of the later dense-nearby-grass report. #2954 (Nov 2) fixes memory capacity accounting/resize target release, not demonstrated grass rendering cost. Most recent grass fragment change was Oct 25; grass alpha rejection was already before lighting in its initial Oct 12 implementation. Issue remains open with bot synchronization comments only; no evidence it is merely stale/forgotten. Reporter build is unknown, so an older installed client remains possible. No performance retest performed. Blocker: no current matched-scene GPU evidence, exact reproduction location/view or affected build ID. Need user-provided captures or agreement to run a client reproduction; no GUI launched, repository edits, tests or performance measurements performed. Request fixed camera/playfield coordinates, build/version, effective grass/shadow/AO settings and FPS cap/VSync; compare settled Release/dev-profiler runs at identical resolution/view with grass Medium versus Off (Off still retains authored grass), shadows On/Off with AO Off, then AO On. Restore baseline at the end to expose clock/streaming drift. Export GPU pass timings (Scene, Shadows, AO geometry/estimation/denoise, Reflection/Translucent, Frame), counters and screenshots; fan noise/utilization alone cannot establish a rendering regression. If Scene dominates, follow with GPU capture/counters to isolate overdraw/early-depth and lighting rather than choosing a heuristic density or lighting reduction.
Checklist
1 of 3 complete- Trace grass coverage/depth, submission, shadow and AO paths and distinguish confirmed behavior from report hypotheses.
- Reproduce the GPU cost with matched scene/settings and unchanged control; identify the material cost.
- Fix the established cause and verify correctness, visual preservation and controlled performance improvement.
- Area
- Project Rubi-Ka
- Project
- engines
- Kind
- Bug
- Task ID
tsk_mnnkq4k759- Updated