Revert "perf(rendering): draw retained frame product"
This reverts commit ef1d263337.
This commit is contained in:
parent
624e1119ca
commit
2c848d4167
13 changed files with 268 additions and 1334 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using System.Numerics;
|
||||
using AcDream.App.Rendering.Scene;
|
||||
using AcDream.App.Rendering.Sky;
|
||||
using AcDream.App.Rendering.Wb;
|
||||
using AcDream.Core.Rendering;
|
||||
|
|
@ -80,33 +79,8 @@ internal interface IOutdoorSceneParticleOwnerSource
|
|||
IReadOnlySet<uint> OutdoorSceneParticleEntityIds { get; }
|
||||
}
|
||||
|
||||
internal readonly record struct RenderFrameEntityDrawRequest(
|
||||
RenderFrameView View,
|
||||
RenderFrameCandidateRoute Route,
|
||||
int RouteIndex,
|
||||
uint CellId,
|
||||
uint TupleLandblockId);
|
||||
|
||||
internal interface IRenderFrameEntityPassExecutor
|
||||
{
|
||||
void BeginEntityFrame(in RenderFrameView view);
|
||||
|
||||
bool DrawEntityRoute(
|
||||
ICamera camera,
|
||||
in RenderFrameView view,
|
||||
RenderFrameCandidateRoute route,
|
||||
int routeIndex,
|
||||
uint cellId,
|
||||
uint tupleLandblockId);
|
||||
|
||||
void CompleteEntityFrame(in RenderFrameView view);
|
||||
|
||||
void AbortEntityFrame();
|
||||
}
|
||||
|
||||
internal sealed class RetailPViewPassExecutor :
|
||||
IRetailPViewPassExecutor,
|
||||
IRenderFrameEntityPassExecutor,
|
||||
IOutdoorSceneParticleOwnerSource
|
||||
{
|
||||
private readonly GL _gl;
|
||||
|
|
@ -173,30 +147,6 @@ internal sealed class RetailPViewPassExecutor :
|
|||
_particleClassifications.BeginFrame();
|
||||
}
|
||||
|
||||
public void BeginEntityFrame(in RenderFrameView view) =>
|
||||
_entities.BeginPackedProductionFrame(in view);
|
||||
|
||||
public bool DrawEntityRoute(
|
||||
ICamera camera,
|
||||
in RenderFrameView view,
|
||||
RenderFrameCandidateRoute route,
|
||||
int routeIndex,
|
||||
uint cellId,
|
||||
uint tupleLandblockId) =>
|
||||
_entities.DrawPackedProductionRoute(
|
||||
camera,
|
||||
in view,
|
||||
route,
|
||||
routeIndex,
|
||||
cellId,
|
||||
tupleLandblockId);
|
||||
|
||||
public void CompleteEntityFrame(in RenderFrameView view) =>
|
||||
_entities.CompletePackedProductionFrame(in view);
|
||||
|
||||
public void AbortEntityFrame() =>
|
||||
_entities.AbortPackedProductionFrame();
|
||||
|
||||
public void AbortFrame()
|
||||
{
|
||||
List<Exception>? failures = null;
|
||||
|
|
@ -382,18 +332,7 @@ internal sealed class RetailPViewPassExecutor :
|
|||
_terrainDiagnostics.Complete();
|
||||
|
||||
DisableClipDistances();
|
||||
if (context.EntityDraw is RenderFrameEntityDrawRequest request)
|
||||
{
|
||||
RenderFrameView drawView = request.View;
|
||||
_entities.DrawPackedProductionRoute(
|
||||
frame.Camera,
|
||||
in drawView,
|
||||
request.Route,
|
||||
request.RouteIndex,
|
||||
request.CellId,
|
||||
request.TupleLandblockId);
|
||||
}
|
||||
else if (context.OutdoorEntities.Count > 0)
|
||||
if (context.OutdoorEntities.Count > 0)
|
||||
{
|
||||
var sceneryEntry = (
|
||||
frame.PlayerLandblockId ?? 0u,
|
||||
|
|
@ -424,18 +363,7 @@ internal sealed class RetailPViewPassExecutor :
|
|||
_clipFrame.BindTerrainClip(_gl);
|
||||
|
||||
DisableClipDistances();
|
||||
if (context.EntityDraw is RenderFrameEntityDrawRequest request)
|
||||
{
|
||||
RenderFrameView drawView = request.View;
|
||||
_entities.DrawPackedProductionRoute(
|
||||
frame.Camera,
|
||||
in drawView,
|
||||
request.Route,
|
||||
request.RouteIndex,
|
||||
request.CellId,
|
||||
request.TupleLandblockId);
|
||||
}
|
||||
else if (context.Dynamics.Count > 0)
|
||||
if (context.Dynamics.Count > 0)
|
||||
{
|
||||
var dynamicsEntry = (
|
||||
frame.PlayerLandblockId ?? 0u,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue