Skip to content

feat(packages): clean-room render features replacement - #10020

Draft
eordano wants to merge 1 commit into
devfrom
pkg/renderfeatures
Draft

eordano wants to merge 1 commit into
devfrom
pkg/renderfeatures

Conversation

@eordano

@eordano eordano commented Sep 7, 2026

Copy link
Copy Markdown
Member

Ocean (procedural mesh, displacement pre-pass, caustics, planar reflection), avatar outline, object highlight (mask -> separable blur -> rim composite) and skybox-to-cubemap URP render features, reimplemented against the renderer assets that bind them.

Deep-review round (adversarial correctness/perf review + fixes, no vendor source consulted):

  • The ocean now renders: Ocean.prefab serializes OceanMeshController component references and scale: 10000 — the reimpl typed the list as GameObject (all null) and dropped the scale field (tiles 10x undersized). Field shape restored; all 200 tiles meshed via the child sweep.
  • Highlight tint/opacity revived: the material serialized _HighlightColor/_BlurRadius, shadowing the globals the feature sets (interaction valid/invalid colors and the avatar fade were all dead). Properties removed from shader+material.
  • The avatar highlight bucket now drains (entries were kept forever: 4 full-res passes/frame for the rest of the session and an unbounded static dictionary across realm switches).
  • Skybox reflection follows the live sky (capture material syncs from RenderSettings.skybox), defaultReflectionMode is restored on teardown, the roughness convolution now spans the mip chain perceptually, cubemaps allocate lazily (5 feature instances exist in the asset; 1 is wired), and the bake coordinator survives domain-reload-less play mode.
  • RenderGraph hardening: ReadWrite on blended targets (the Vulkan discard hazard), URP global textures declared before sampling, clamp wrap on blur RTs, blur chain at half res (double effective kernel density at half cost), Create() re-entry leaks fixed, ocean displacement region follows the camera, published globals cleared when gates flip off, outline snapshot moved off the never-invoked OnCameraCleanup hook.
  • StylizedOcean: Gerstner waves now perturb the shading normal (analytic partials), ~36x shader-variant cut, world-scale-safe foam hash, DepthNormals matches the project's URP convention.
  • Note: the ocean sub-passes (displacement/caustics/SSR) ship gated off in the renderer asset, so several fixes are hardening for when they're enabled.
  • Verified: the integration-branch Unity build gate (also confirms the two URP 17 API signatures used).

Provenance: clean-room reimplementation — written against the API surface the client consumes, never derived from vendor source. Script GUIDs are pinned where existing .asset/.prefab references depend on them. The review + fix round below was likewise executed without reading any vendor source.

Ocean (procedural mesh, displacement pre-pass, caustics, planar reflection), avatar outline, object highlight (mask -> separable blur -> rim composite) and skybox-to-cubemap URP render features, reimplemented against the renderer assets that bind them.

**Deep-review round** (adversarial correctness/perf review + fixes, no vendor source consulted):
- The ocean now renders: `Ocean.prefab` serializes `OceanMeshController` component references and `scale: 10000` — the reimpl typed the list as `GameObject` (all null) and dropped the scale field (tiles 10x undersized). Field shape restored; all 200 tiles meshed via the child sweep.
- Highlight tint/opacity revived: the material serialized `_HighlightColor`/`_BlurRadius`, shadowing the globals the feature sets (interaction valid/invalid colors and the avatar fade were all dead). Properties removed from shader+material.
- The avatar highlight bucket now drains (entries were kept forever: 4 full-res passes/frame for the rest of the session and an unbounded static dictionary across realm switches).
- Skybox reflection follows the live sky (capture material syncs from `RenderSettings.skybox`), `defaultReflectionMode` is restored on teardown, the roughness convolution now spans the mip chain perceptually, cubemaps allocate lazily (5 feature instances exist in the asset; 1 is wired), and the bake coordinator survives domain-reload-less play mode.
- RenderGraph hardening: `ReadWrite` on blended targets (the Vulkan discard hazard), URP global textures declared before sampling, clamp wrap on blur RTs, blur chain at half res (double effective kernel density at half cost), `Create()` re-entry leaks fixed, ocean displacement region follows the camera, published globals cleared when gates flip off, outline snapshot moved off the never-invoked `OnCameraCleanup` hook.
- StylizedOcean: Gerstner waves now perturb the shading normal (analytic partials), ~36x shader-variant cut, world-scale-safe foam hash, DepthNormals matches the project's URP convention.
- Note: the ocean sub-passes (displacement/caustics/SSR) ship gated off in the renderer asset, so several fixes are hardening for when they're enabled.
- Verified: the integration-branch Unity build gate (also confirms the two URP 17 API signatures used).

---
**Provenance**: clean-room reimplementation — written against the API surface the client consumes, never derived from vendor source. Script GUIDs are pinned where existing .asset/.prefab references depend on them. The review + fix round below was likewise executed without reading any vendor source.
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🚦 CI Status

Build

Waiting for the build to start…

Lint

No C# files changed — lint ratchet skipped.

Tests

Waiting for tests to start…

Performance

Bare-metal benchmarks run automatically after each successful build; results land in this section. Add the perf_test label to run the in-repo Unity performance suite instead (skips normal CI and blocks merge while set).

Automation

On demand — comment /visual-tests on this PR to run the visual regression suite against its build.

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.

1 participant