feat(render): Phase A8 Wave 1 — WB scaffolding extraction + stencil low-level method
Five tasks shipped together (interdependent at build time): Task 1: WbRenderPass enum — verbatim port of WB RenderPass.cs:1-22 Task 2: WbFrustum + WbBoundingBox + FrustumTestResult — verbatim port of WB Frustum.cs (98 LOC) with namespace + BoundingBox-type adaptations. +7 unit tests. Task 3: EnvCellSceneryInstance + EnvCellLandblock — verbatim port of WB SceneryInstance.cs:1-161, renamed scope-narrow. Dropped editor-only fields (DisqualificationReason, ParticleEmitters, IsQueuedForUpload, InstanceBufferOffset, InstanceCount, MdiCommands, IsTransformOnlyUpdate) + InstanceId narrowed uint (we don't use ObjectId's editor methods). +5 unit tests. Task 4: EnvCellVisibilitySnapshot — direct port of WB VisibilitySnapshot narrowed to BatchedByCell + VisibleLandblocks only. Task 7: IndoorCellStencilPipeline.RenderBuildingStencilMask — new low-level WB-faithful entry mirroring PortalRenderManager:471-484. No surrounding GL state setup (caller's responsibility). Probe fields LastStencilVertexCount / LastStencilWasFarPunch / LastStencilBuildingId for the [stencil] probe emitter in Task 9. Build green, 18 tests pass (7 new Frustum + 5 new SceneryInstance + 6 existing stencil pipeline). Ready for Wave 2 (EnvCellRenderer port). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
95f0d5267b
commit
fc68d6d01f
7 changed files with 595 additions and 0 deletions
31
src/AcDream.App/Rendering/Wb/WbRenderPass.cs
Normal file
31
src/AcDream.App/Rendering/Wb/WbRenderPass.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace AcDream.App.Rendering.Wb;
|
||||
|
||||
/// <summary>
|
||||
/// Phase A8 (2026-05-28): WB's RenderPass enum, extracted verbatim from
|
||||
/// <c>references/WorldBuilder/Chorizite.OpenGLSDLBackend/Lib/RenderPass.cs:1-22</c>.
|
||||
///
|
||||
/// Renamed to <c>WbRenderPass</c> to keep the WB-faithful name distinct
|
||||
/// from any future acdream-side RenderPass with different semantics.
|
||||
/// Consumed by <see cref="EnvCellRenderer"/> and matches the
|
||||
/// <c>uRenderPass</c> uniform in the modern mesh shaders.
|
||||
/// </summary>
|
||||
public enum WbRenderPass
|
||||
{
|
||||
/// <summary>
|
||||
/// The opaque pass. Only non-transparent objects are rendered.
|
||||
/// </summary>
|
||||
Opaque = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The transparent pass. Only transparent objects are rendered,
|
||||
/// usually after the opaque pass.
|
||||
/// </summary>
|
||||
Transparent = 1,
|
||||
|
||||
/// <summary>
|
||||
/// A single-pass render that includes both opaque and (sometimes)
|
||||
/// transparent objects, or for special cases like skyboxes and
|
||||
/// certain UI elements.
|
||||
/// </summary>
|
||||
SinglePass = 2,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue