Switch PMREM probe to studio2

This commit is contained in:
Meta Vens 2026-05-11 06:37:10 +01:00
commit 027d708e59
6 changed files with 6 additions and 5 deletions

Binary file not shown.

View file

@ -38,7 +38,7 @@ public sealed class D3D12Renderer : IAquariumRenderer
private const string GridShaderRelativePath = "Render/Shaders/D3D12Grid.hlsl";
private const string SceneShaderRelativePath = "Render/Shaders/D3D12Scene.hlsl";
private const string PostShaderRelativePath = "Render/Shaders/D3D12Post.hlsl";
private const string StudioPmremRelativePath = "Assets/Textures/studio3_pmrem.dds";
private const string StudioPmremRelativePath = "Assets/Textures/studio2_pmrem.dds";
private static readonly DebugUi.DebugUiOption[] RenderDebugOptions =
[
new(0, "Final"),

View file

@ -8,3 +8,4 @@
{"timestamp":"2026-05-11T06:28:00+01:00","topic":"pmrem-scene-binding","lesson":"The Studio3 PMREM asset is live in the scene as a D3D12 TextureCube bound at t22. The renderer owns a narrow RGBA16F DX10 DDS cubemap loader, keeps upload resources alive until the copy fence completes, and the scene shader uses roughness-scaled SampleLevel for specular material reflections only.","files":["src/Aquarium.Engine/Render/D3D12CubeTexture.cs","src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","state/map.yaml","state/memory.json"]}
{"timestamp":"2026-05-11T06:42:00+01:00","topic":"grid-mirror-surface","lesson":"Grid linework was replaced with a terminating perfect mirror surface. Grid hits now write the primary scene packet with FIELD_ID_GRID, terrain normal, full coverage, and Studio3 PMREM mip 0 reflection instead of using the transparent event lane.","files":["src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","state/map.yaml","state/memory.json"]}
{"timestamp":"2026-05-11T06:50:00+01:00","topic":"pmrem-world-basis","lesson":"Aquarium world space is Z-up while the baked Studio3 PMREM cubemap is sampled as Y-up. Every PMREM lookup must convert world directions with (x, z, y) before TextureCube sampling, or the HDRI appears sideways.","files":["src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","state/memory.json"]}
{"timestamp":"2026-05-11T07:00:00+01:00","topic":"studio2-pmrem-probe","lesson":"Active reflection probe switched to Studio2 from E:\\Projects\\Aetheria-Economy\\Assets\\Textures\\studio2.hdr. The renderer loads Assets/Textures/studio2_pmrem.dds through the existing D3D12 TextureCube PMREM path, and the unused Studio3 DDS was cut from live assets.","files":["src/Aquarium.Engine/Assets/Textures/studio2_pmrem.dds","src/Aquarium.Engine/Assets/Textures/studio3_pmrem.dds","src/Aquarium.Engine/Render/D3D12Renderer.cs","state/map.yaml","state/memory.json"],"source":"E:\\Projects\\Aetheria-Economy\\Assets\\Textures\\studio2.hdr"}

View file

@ -52,10 +52,10 @@ renderer_state:
current:
- D3D12 default renderer behind IAquariumRenderer with explicit device/queue/swapchain, command allocators, fences, descriptor arenas, upload ring constants, tracked render targets, command events, resize rebuild, HDR/bloom/present, temporal diagnostics, and DirectWrite overlay bridge.
- Deferred scalar Grid height target rendered from additive brush passes.
- Direct-traced Grid surface is a terminating perfect mirror over the scalar height field, sampling Studio3 PMREM mip 0.
- Direct-traced Grid surface is a terminating perfect mirror over the scalar height field, sampling Studio2 PMREM mip 0.
- SDF/analytic solids for Self, planets, and the cursor locator.
- Body light buffer feeds Self emission and direct body lighting; future other Selves should join this light lane, not a generic field-instance table.
- Studio3 PMREM DDS cubemap is loaded as a D3D12 TextureCube and sampled for roughness-mip PBR specular reflections.
- Studio2 PMREM DDS cubemap is loaded as a D3D12 TextureCube and sampled for roughness-mip PBR specular reflections.
- DirectWrite/Direct2D debug UI panel with code-first controls bound to renderer state.
- Global GraphicsSettings document feeding render debug, exposure, bloom intensity, and bloom veil.
- Bundled blue-noise texture assets are retained for future dithering/noise work even though the removed medium path no longer samples them.

View file

@ -28,13 +28,13 @@
],
"rendering": [
"D3D12 Grid line width normalization uses periodic domains with `fwidth()` and pixel-width constants, not world-space footprint guesses.",
"The Grid is direct-traced as a terminating mirror surface over the scalar height field. It writes the primary surface packet with FIELD_ID_GRID, terrain normal, full coverage, and Studio3 PMREM mip 0 reflection.",
"The Grid is direct-traced as a terminating mirror surface over the scalar height field. It writes the primary surface packet with FIELD_ID_GRID, terrain normal, full coverage, and Studio2 PMREM mip 0 reflection.",
"Mouse/cursor-owned SDF bodies need object-motion reprojection. Carry current and previous cursor world anchors through frame constants and reproject cursor hits from current center to previous center.",
"The cursor locator uses the MathWorld teardrop curve profile with m=6, revolved around vertical: x=cos(t), y=sin(t)*sin^m(t/2), radius `sqrt(1 - x^2) * ((1 - x) / 2)^3`. Ripples belong in the SDF radius function. Material is brass GGX metal with brass-tinted F0, no diffuse metal term, non-emissive, and no ambient floor.",
"Heavy/specialized SDF evaluators should not live inside generic packed-id helpers when those helpers are called repeatedly; avoid shader compiler path cloning.",
"Lighting is diegetic. Self is the initial emitter; later other Selves should emit through an explicit body light lane, not generic field instances or ambient convenience fill.",
"Keep bundled blue-noise texture assets available for future dithering/noise work even when no current pass samples them.",
"Specular IBL uses the Studio3 PMREM cubemap: bake HDR latlong radiance into roughness-indexed cubemap mips, load it as a D3D12 TextureCube, and sample it by reflection direction plus roughness LOD. Convert Aquarium's Z-up world directions to cubemap Y-up directions before sampling: (x, z, y). Grid mirror reflection samples mip 0 directly; body material reflections use roughness LOD. Keep this as material reflection response, not a replacement for diegetic body light authority.",
"Specular IBL uses the Studio2 PMREM cubemap: bake HDR latlong radiance into roughness-indexed cubemap mips, load it as a D3D12 TextureCube, and sample it by reflection direction plus roughness LOD. Convert Aquarium's Z-up world directions to cubemap Y-up directions before sampling: (x, z, y). Grid mirror reflection samples mip 0 directly; body material reflections use roughness LOD. Keep this as material reflection response, not a replacement for diegetic body light authority.",
"HDR/PBR presentation follows research/rendering/hdr-pbr-presentation.md: scene-linear lighting, explicit exposure, pre-tonemap bloom/veil, then display transform.",
"Current temporal diagnostics are for inspection. With projection jitter disabled, final presentation should not blindly trust temporal color history until a real temporal contract earns authority."
],