Skip to content

fix(anari,gltf): resolve rendering and deformation review feedback - #2990

Merged
ibgreen-openai merged 2 commits into
masterfrom
codex/anari-gltf-review-correctness
Aug 6, 2026
Merged

fix(anari,gltf): resolve rendering and deformation review feedback#2990
ibgreen-openai merged 2 commits into
masterfrom
codex/anari-gltf-review-correctness

Conversation

@ibgreen-openai

@ibgreen-openai ibgreen-openai commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Goals

Resolve every actionable, currently reproducible review finding on the recently merged ANARI, glTF, animation, PBR, and shared-rendering pull requests without introducing parallel implementations or regressing existing WebGL/WebGPU behavior.

Changes

Animation and retained geometry

  • Give repeated skinned mesh nodes independent models and joint palettes, resolving generated primitive groups by identity instead of ambiguous glTF names.
  • Decode normalized and quantized POSITION, NORMAL, and TANGENT attributes correctly before applying morph targets while preserving immutable source data and packed fallback buffers.
  • Enable skin shaders only when a usable joint palette exists, rebuilding correctly across absent, present, and empty palette transitions.

Shared physical and deferred rendering

  • Recognize floating-point and packed HDR framebuffer formats as linear and apply the same exposure, tone mapping, and output transfer to uncovered clear pixels.
  • Sample generated linear image-based-lighting cubemaps and BRDF lookup tables exactly once in the canonical GLSL and WGSL shaders.
  • Resolve deferred scenes into caller-owned offscreen framebuffers and fall back when authored spotlight cones, multiple directional lights, unsupported specular maps, or light-capacity overflow cannot be represented faithfully.

Asset import and documentation

  • Restrict imported punctual lights to the selected glTF scene hierarchy.
  • Submit encoded scene work before destroying borrowed renderer or environment resources in every complete public example.
  • Correct capability documentation for automatic skinning, morph animation, reference physical transmission, and chromatic dispersion.
  • Restore the required independent-MIT and NVIDIA RAPIDS cuGraph inspiration notices on two recently merged graph files that were breaking the shared repository provenance check.
  • Existing UV1 JSON wiring, authored spotlight inner angles, and GPU-graph endpoint-name validation were independently verified as already fixed on master; no redundant changes were introduced.

Review coverage

Addresses actionable findings from #2973, #2978, #2979, #2980, #2981, #2982, #2984, and #2985. Non-actionable reviewer mentions, already-fixed threads, and unrelated feedback on an unmerged stacked feature branch are excluded.

Verification

  • Strict all-workspace TypeScript project-reference builds, including forced ANARI, experimental, glTF, engine, and shader dependencies.
  • 37 node suites / 175 passing tests across ANARI, glTF, engine animation, shared rendering, shader tools, documentation, and real CC0 assets, plus 109 passing graph/provenance checks.
  • Dedicated real-asset regressions for shared and independently skinned SimpleSkin meshes and normalized AnimatedMorphCube geometry.
  • 12 browser suites / 61 passing native Metal WebGL and WebGPU tests, including precise HDR presentation pixels, generated linear environment lighting, genuine offscreen deferred resolve, and retained skinning.
  • A real merged integration of current master, feat(gltf): add source-faithful animated asset interchange #2986, feat(gltf): native material variants, GPU instancing, visibility, and typed animation #2987, and this PR passes strict project references, 44 node suites / 212 tests, 13 browser suites / 62 native GPU tests, and a real SimpleSkin-to-ANARI-to-GLB-to-animated-reimport round trip.
  • The complete production Docusaurus website and post-build LLM documentation checks pass; four changed reference pages independently compile as MDX and verify device submission before resource destruction.
  • Direct Biome formatting passes all 22 changed TypeScript files; the standard local Yarn lint entry point is blocked by the pre-existing stale development-tools installation.

Architecture

Retains loaders.gl as the only file decoder, the existing engine morph and animation runtime, the canonical shared skin/PBR shaders, experimental-owned rendering passes, and the thin ANARI/glTF adapter. No duplicate renderer, material model, animation mixer, decoder, or deformation pipeline is introduced.

@ibgreen-openai
ibgreen-openai marked this pull request as ready for review August 6, 2026 13:35
@ibgreen-openai
ibgreen-openai merged commit 6a9300a into master Aug 6, 2026
8 checks passed
@ibgreen-openai
ibgreen-openai deleted the codex/anari-gltf-review-correctness branch August 6, 2026 13:35

@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: 4f28ecf33b

ℹ️ 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 on lines +543 to +546
#ifdef USE_SCENE_ENVIRONMENT
let brdf = brdfSample.rgb;
let diffuseLight = diffuseSample.rgb;
let specularLight = specularSample.rgb;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve decoding for encoded scene environments

When a SceneRenderer uses sRGB-encoded data stored in linear UNORM textures with MANUAL_SRGB enabled—such as adapting prefiltered image assets loaded by the documented loadPBREnvironment() path—USE_SCENE_ENVIRONMENT now bypasses SRGBtoLINEAR unconditionally. That flag identifies the renderer API, not the textures' encoding, so these environments are interpreted as linear and render substantially too bright; distinguish generated-linear environments from encoded loaded environments instead of skipping conversion for every scene environment.

Useful? React with 👍 / 👎.

Comment on lines +172 to +173
const presentationModel = this.lightingRenderer.textureModel;
presentationModel.setProps({backgroundTexture: lightingTexture});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Bypass canvas aspect fitting for offscreen resolves

When the supplied framebuffer has a different aspect ratio from the default canvas, setProps() calls BackgroundTextureModel.updateScale(), which computes its scale from the canvas dimensions rather than the framebuffer. The lighting texture already has the framebuffer's dimensions, so the correct scale is 1:1; reusing this screen-presentation model causes the offscreen resolve to crop or stretch one axis. Use a fullscreen copy that is sized from the destination framebuffer rather than the canvas.

Useful? React with 👍 / 👎.

id: `scene-${options.id}`,
framebuffer: options.framebuffer,
clearColor: [background[0], background[1], background[2], background[3] ?? 1],
clearColor: getPresentedSceneBackground(this.device, options, background),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Apply background presentation in the deferred path

When these options are rendered through DeferredSceneRenderer, this color-managed clear is used only if the scene falls back to forward rendering. The compatible deferred path still clears its G-buffer with the raw background, and its lighting shader returns that raw value for untouched pixels, so adding an unsupported material or light changes the background's exposure, tone mapping, and output encoding. Apply the same presentation transform to deferred clear pixels to keep the two paths consistent.

Useful? React with 👍 / 👎.

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