Repository navigation
Conversation
…, so F0 0.04, the harness's value (PRD-646)
…nergy conservation out (PRD-646)
… cornell gains six rows Unreal compiles energy preservation out for this project, so the harness's twin stops subtracting a loss Unreal does not draw. `ENERGY_CONSERVATION` is the project's switch, not the shader's default: `r.Substrate.ProjectGBufferFormat=0` keeps the blendable Substrate GBuffer (UE 5.8.3: Shaders/Private/ShadingEnergyConservation.ush:20-31, RenderCore/Private/RenderUtils.cpp:2226-2233, Engine/Private/ShaderCompiler/ShaderCompiler.cpp:4093), so `ComputeEnergyPreservation` returns 1. The albedo scale is now `preservation / (1 - F)` with F0 and F90 read from the material the engine draws, so three's pointwise loss cancels and no loss is added; `?diffuseEnergy=three` still draws the BEFORE arm. The twin keeps its source's class, so `?specular=0` and `?specular=f0` stay ablations under the term, and the owned engine, which bridges no `MeshPhysicalNodeMaterial`, refuses the combination by name (`TN_DIFFUSE_ENERGY_SPECULAR`) instead of drawing the term's frame for both knobs. `cornell` L1 4 of 12 rows to 10 of 12; `sunlit-room` 40 of 40 to 39 of 40 (`sun15-window` Floor, dP50 0.011 against 0.010). No constant was added. AC-2 and the `cornell` box stay open with the numbers on them (PRD-646).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR about?
The GI calibration harness drew the
cornellbox darker than Unreal because it subtracted a diffuse energy loss that Unreal does not subtract in this project. This PR removes that loss, socornellpasses 10 of 12 direct-light rows instead of 4 (PRD-646).Why does it matter?
PRD-646 is the gate for every GI verdict: a calibration scene must match Unreal before a GI change can be judged against it. Round 9 (#609) ported Unreal's
1 - Ediffuse loss. Rounds 11 to 13 read Unreal's source and the level and found that Unreal compiles that loss out for this project.USE_ENERGY_CONSERVATIONis 1 only with(SUBSTRATE_ENABLED && SUBSTRATE_GBUFFER_FORMAT>0) || LEGACY_MATERIAL_ENERGYCONSERVATION(UE 5.8.3: Engine/Shaders/Private/ShadingEnergyConservation.ush:20-31).r.Substrate.ProjectGBufferFormat=0(blendable GBuffer,RenderUtils.cpp:2226-2233), andr.Material.EnergyConservationdefaults to 0 (Renderer/Private/ShadingEnergyConservation.cpp:71-74).cornell: Unreal's specular on/off is 1 + the analytic GGX lobe (Floor 1.0274, Back 1.0138). The harness drew 1 - E + the lobe (0.9993, 1.0038). The gap equals E on each row.Done
cornellmaterial from the level with Unreal Python.Specularis 0.5, so F0 0.04 and F90 1, the harness's values. Nothing to port.D*Vis*F*NoL. The 5 cm sphere lamp is exactly the point light at roughness 1 (SinAlpha0). The harness's1 - Eis the gap.scripts/unreal-look/scaffold/render/diffuseEnergy.tsreads the project's switch (ENERGY_CONSERVATION = false), so the scale is1 / (1 - F)and the diffuse keeps all of its light. F0/F90 come from the material.?specular=0now survives the term, and fails closed by name (TN_DIFFUSE_ENERGY_SPECULAR) on the owned engine, which bridges noMeshPhysicalNodeMaterial.scripts/__tests__/unreal-look-diffuse-energy.spec.ts, 2 failed before, 10 pass after.pnpm unreal-look:compare --scene gi:cornell,gi:sunlit-room --layer L1, 2 runs per arm, byte-identical within each arm:cornellsunlit-roomNo file under
packages/ortemplates/changes.Still open
cornellBox_Tallin two poses (2.9% and 3.2% low) andsunlit-roomsun15-windowFloor(3.1% bright, dP50 0.011 against 0.010; it was 1.4% bright and passing before). No constant was added to win them back.MeshPhysicalNodeMaterialcatalogue entry would let?specular=0run on the owned engine.Checks
pnpm exec vitest run scripts/__tests__/unreal-look: 47 files, 678 tests pass.pnpm check:docspasses.unreal:statusis up to date. Biome is clean on the changed files.pnpm prd:progress: 3/4 phases, 11/12 boxes, 2/3 ACs,prd:75%.