Skip to content

feat(effects): add HDR glass showcase and emissive packet lighting#2763

Open
ibgreen-openai wants to merge 3 commits into
masterfrom
codex/network-packet-spraying
Open

feat(effects): add HDR glass showcase and emissive packet lighting#2763
ibgreen-openai wants to merge 3 commits into
masterfrom
codex/network-packet-spraying

Conversation

@ibgreen-openai

@ibgreen-openai ibgreen-openai commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Goals

  • Demonstrate reusable state-of-the-art glass effects through Multipath Reliable Connection (MRC) packet spraying inspired by OpenAI's supercomputer networking article.
  • Add reusable, portable optical-material and postprocessing primitives that work across WebGPU and WebGL.
  • Keep the network diagram readable while showing resilient multi-plane routing, alternating red/green traffic, physically motivated glass, and restrained emissive lighting.

Changes

  • Add reusable emissiveMaterial and opticalPointLights shader modules and plugins, including matching WGSL/GLSL implementations and a fixed 16-light portable uniform layout.
  • Extend reusable glass and reflective materials with optional nearby-light shading while preserving their existing helper signatures.
  • Correct reflective environment sampling to follow the camera-reflected view ray and preserve the full opacity range for opaque metallic surfaces.
  • Support configurable color attachment formats in A-buffer and weighted-blended transparency renderers so HDR values survive translucent compositing.
  • Store exact A-buffer translucent fragments as two packed half-float pairs, preserving highlights above 1.0 through capture and resolve; update the 16-byte fragment allocation and bounded slice planning accordingly.
  • Add an exported ACES tone-mapping shader pass and configurable linear samplers for named shader-pass render targets.
  • Correct multiscale bloom filtering and avoid alpha-related blur amplification that previously produced square halos.
  • Render small saturated red/green emissive packets, selective bloom, dynamic colored switch/link reflections, and muted metallic red/green endpoint servers.
  • Preserve alternating packet traffic, a 4x4 server grid, independent network planes, optional orbit controls, hover picking, and WebGPU/WebGL fallbacks.
  • Rename the example to Effects: Glass, display Network Packet Spraying as its visible subtitle, and add optional nonbreaking subtitle support to shared example headers.
  • Reduce showcase A-buffer over-allocation, remove an unused shader-input allocation, and release metallic shader inputs during teardown.
  • Document glass, transparency, reflective shading, HDR, selective bloom, tone mapping, and the MRC showcase.

Verification

  • nvm use: unavailable in this shell; the active Node version is v22.22.1.
  • yarn install: passed using env -u YARN_NO_PROXY corepack yarn install.
  • yarn build: passed using env -u YARN_NO_PROXY corepack yarn build after the final code and formatting changes.
  • yarn lint fix: passed using env -u YARN_NO_PROXY corepack yarn lint fix.
  • yarn test-node: passed, 186 tests with two skipped, including regression coverage for camera-relative WGSL/GLSL reflections and opaque reflective materials.
  • Focused Chromium GPU tests: passed, 27 tests covering actual translucent HDR A-buffer readback, WBOIT HDR output, bloom, tone mapping, and linear shader-pass target samplers.
  • yarn examples:typecheck: passed for 32 example workspaces.
  • Packet-spraying standalone production build: passed.
  • yarn website:build: passed.
  • (cd website && yarn build): passed.
  • WebGPU and WebGL browser screenshots/canvas-pixel checks: passed with no page or console errors; hover explanations passed for servers, access switches, plane switches, and spine switches.
  • GitHub Actions: all required checks passed on the final HDR-storage and showcase-title revision: test, examples, and website.
  • yarn test: Node suite passed and the browser suite reported 1,281 passing, 25 skipped, and one existing unrelated failure in modules/arrow-layers/test/layers/arrow-layers.spec.ts (polygonViewportUniforms missing from the Arrow polygon WebGPU shader layout). The same Arrow failure was present before these changes.

Follow-up

  • Resolve the pre-existing Arrow polygon WebGPU test failure independently of this optical-material/showcase change.
  • More advanced depth-derived thickness, caustics, environment probes, and ray-traced transmission remain separate future work.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9bba82bae4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread modules/experimental/src/oit/a-buffer-renderer.ts
@ibgreen-openai ibgreen-openai changed the title feat(experimental): add emissive packet lighting and HDR bloom feat(effects): add HDR glass showcase and emissive packet lighting Jul 26, 2026
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.

2 participants