CNA-GAP-032: PbrEffect takes one punctual light per draw

CNA snapshot 3b43bd86  ·  Known Issues › Functional gaps  ·  source links pinned to 3b43bd86

✓

Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 3b43bd86; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.

PbrEffect and SkinnedPbrEffect carry a single PunctualLightEXT, so a scene with several point or spot lights must split draws per light; the double-sided back-face flip that this entry also listed now runs on every PBR renderer.

Identifier
CNA-GAP-032
Category
Functional gap
Subsystem
Graphics & renderers
Status
Narrowed (partially fixed; describes only what survives)
Verified against
CNA 3b43bd86 (3b43bd8687ed46523d873f9bec4b32bd8481dcb5)
Evidence basis
Source-verified: read at TARGET, not executed
Tests touching this area
Yes: see Current tests
Affected contract
PbrEffect::setPunctualLightEXT (one PunctualLightEXT per effect)

Expected behaviour

A glTF scene may light one object with several punctual lights; a PBR effect that applies them in one draw needs a light list rather than one light.

Actual behaviour at TARGET

PbrEffect.hpp holds a single PunctualLightEXT (“Supplies one punctual light and its shadow”), and the PBR draw parameters carry one punctual light, so a second light needs a second draw.

Fixed since first recorded: the back-face normal flip of double-sided materials (GpuDrawParams::pbrDoubleSided) is honoured by every PBR renderer: EasyGL (GSC-0010, a1414a1b0), SDL_GPU and WEBGPU (7059decf5), DIRECTX9, FNA3D and SOFTWARE (f85b78429), with the shared fixture pbr_double_sided_test.cpp registered per renderer. CNA ships no environment-cube or shadow-map generator; an application supplies those textures to the PbrEffect receivers itself.

Source locations

Evidence

Checked by reading at 3b43bd86 (the front-facing search was a grep of all of modules/); not executed. The original limits were reported by the living-room-simulator sample @ 2bf3f56b against an earlier CNA revision and re-established individually.

Re-verified at c6dec91f: pbrDoubleSided is read by D3D9PbrDraw.cpp, EasyGLRenderer.cpp, Fna3dDraw.cpp, SdlGpuRenderer.cpp, SoftwareRenderer.cpp and WebGPURenderer.cpp; PbrEffect.hpp still holds one PunctualLightEXT. Not executed.

Focused reproduction

No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.

Current tests

pbr_double_sided_test.cpp lights a double-sided back face on each PBR renderer that registers it (EasyGL_Pbr_DoubleSided, DirectX9_Pbr_DoubleSided and the FNA3D, SDL_GPU, SOFTWARE and WEBGPU registrations); no test draws two punctual lights.

Regression test

A two-punctual-light draw once that limit is lifted.

Blast radius

glTF scenes that light one object with several punctual lights.

Workaround

Split draws per punctual light, or approximate the extra lights with the directional lights.

The same subject is explained at several altitudes. These are the neighbouring pages at each one.