Fix blotchy weather wetness on low-poly meshes/umbrellas #1124

Closed
TheSlowly wants to merge 1 commit from TheSlowly/Slipstream:avatar-weather-large-triangles into main
Collaborator

Cause: the rest-pose accumulation pass (clean_weather_accum.comp, WX_AC_ACCUM)
sampled one corner per triangle. A canopy panel spans many ~4 cm grid cells, so the
cells between its vertices stayed empty. weatherAvatarAccum fell back to the
per-avatar wetness wherever the filtered occupancy was under kAcOccMin, so the
canopy showed the grid's value around its vertices and the fallback's in between.

Fix: triangles larger than ~0.75 cell now sample an evenly spaced grid of points
over their area (at most 0.75 cells apart, capped at 24 divisions per edge = 325
samples per triangle). Smaller triangles keep the rotating single-corner sample,
so dense meshes like avatar bodies cost about the same; some 2–4 cm body
triangles now get 6 samples instead of 1. The rest box is unaffected (the extra
points lie inside each triangle).

Cause: the rest-pose accumulation pass (clean_weather_accum.comp, WX_AC_ACCUM) sampled one corner per triangle. A canopy panel spans many ~4 cm grid cells, so the cells between its vertices stayed empty. weatherAvatarAccum fell back to the per-avatar wetness wherever the filtered occupancy was under kAcOccMin, so the canopy showed the grid's value around its vertices and the fallback's in between. Fix: triangles larger than ~0.75 cell now sample an evenly spaced grid of points over their area (at most 0.75 cells apart, capped at 24 divisions per edge = 325 samples per triangle). Smaller triangles keep the rotating single-corner sample, so dense meshes like avatar bodies cost about the same; some 2–4 cm body triangles now get 6 samples instead of 1. The rest box is unaffected (the extra points lie inside each triangle).
A worn low-poly umbrella's canopy panels span many ~4 cm grid cells, but
the accumulation pass sampled one corner per triangle, leaving the cells
between the vertices empty. The fragment shader fell back to the
per-avatar wetness there, so the canopy showed the grid's wetness as
soft square blobs around its vertices. Triangles larger than ~0.75 cell
now sample a barycentric lattice over their area (up to 24 divisions per
edge); smaller ones keep the rotating single corner.
Owner

Merged, thanks! Cherry-picked as f3c24ffab5 on main, 306075abe1 on release/1.4 and ef4853e8b5 on release/1.5.

Verified in-world: same scene, parcel rain, worn umbrella -- the canopy was splotchy on the build before this change and is evenly wet with it; the body still gets wet with the umbrella tilted away (no regression).

One follow-up when you have time: every triangle now reads all three corners (the vertex / skin reads of this pass roughly triple) and avatar body triangles over ~3 cm take 6 samples instead of 1. Could you measure c_weather_accum (RenderVKGpuTimers) on a dense avatar at a fixed spot before vs after? We saw ~0.69 ms in a busy scene but have no same-scene baseline.

Related, found while testing this: #1130 (local weather starves the avatar weather path; parcel weather works) -- that's why the umbrella showed nothing under local weather.

Merged, thanks! Cherry-picked as `f3c24ffab5` on main, `306075abe1` on release/1.4 and `ef4853e8b5` on release/1.5. Verified in-world: same scene, parcel rain, worn umbrella -- the canopy was splotchy on the build before this change and is evenly wet with it; the body still gets wet with the umbrella tilted away (no regression). One follow-up when you have time: every triangle now reads all three corners (the vertex / skin reads of this pass roughly triple) and avatar body triangles over ~3 cm take 6 samples instead of 1. Could you measure `c_weather_accum` (RenderVKGpuTimers) on a dense avatar at a fixed spot before vs after? We saw ~0.69 ms in a busy scene but have no same-scene baseline. Related, found while testing this: #1130 (local weather starves the avatar weather path; parcel weather works) -- that's why the umbrella showed nothing under local weather.
sky_line closed this pull request 2026-10-27 06:02:20 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
sky_line/Slipstream!1124
No description provided.