Revert "feat(render): Campaign V slice V4d-2 - move terrain onto the RHI"

This reverts commit b064668b63.
This commit is contained in:
Erik 2026-07-27 22:38:02 +02:00
parent b064668b63
commit ad61f250fb
7 changed files with 553 additions and 496 deletions

View file

@ -90,11 +90,7 @@ public sealed class WorldRenderCompositionTests
}
[Theory]
// The "terrain shader" row went with Campaign V slice V4d: terrain's
// IGpuPipeline compiles terrain_modern itself, so there is no longer a
// terrain-shader publication step for a failure to be injected into. The
// invariant this theory pins is unchanged and still covered by every row
// below.
[InlineData("terrain shader", "terrain shader")]
[InlineData("scene lighting", "scene lighting")]
[InlineData("debug lines", "debug lines")]
[InlineData("HUD", "text renderer|debug font")]
@ -251,6 +247,9 @@ public sealed class WorldRenderCompositionTests
public void SetTerrainAnisotropic(TerrainAtlas atlas, int level) =>
AnisotropicLevel = level;
public Shader CreateTerrainShader(GL gl, string shadersDirectory) =>
Resource<Shader>("terrain shader");
public SceneLightingUboBinding CreateSceneLighting(GL gl) =>
Resource<SceneLightingUboBinding>("scene lighting");
@ -269,8 +268,8 @@ public sealed class WorldRenderCompositionTests
public TerrainModernRenderer CreateTerrain(
GL gl,
IGpuDevice device,
ICurrentGpuFrameSource frameSource,
BindlessSupport bindless,
Shader shader,
TerrainAtlas atlas,
IGpuResourceRetirementQueue retirement) =>
Resource<TerrainModernRenderer>("terrain");
@ -351,6 +350,8 @@ public sealed class WorldRenderCompositionTests
public void PublishBindlessSupport(BindlessSupport value) =>
Fail("bindless");
public void PublishTerrainShader(Shader value) =>
Fail("terrain shader");
public void PublishSceneLighting(SceneLightingUboBinding value) =>
Fail("scene lighting");
public void PublishDebugLines(DebugLineRenderer value) =>

View file

@ -55,14 +55,7 @@ public sealed class TerrainTextureTilingTableTests
"terrain_modern.frag");
string shader = File.ReadAllText(shaderPath);
// Campaign V slice V4d moved the table out of a loose
// `uniform float uTexTiling[36]` and into a std140 block at
// GpuBindingModel.UniformTerrainTiling. The element type and count are
// what every sample site below depends on, so both are still pinned —
// and the binding number is now pinned too, because the shader and
// GpuBindingModel have to agree.
Assert.Contains("binding = 3) uniform TerrainTiling {", shader);
Assert.Contains("float uTexTiling[36];", shader);
Assert.Contains("uniform float uTexTiling[36];", shader);
Assert.Contains("baseUV * terrainTiling(pOverlay0.z)", shader);
Assert.Contains("baseUV * terrainTiling(pOverlay1.z)", shader);
Assert.Contains("baseUV * terrainTiling(pOverlay2.z)", shader);