fix(rendering): normalize empty dispatcher evidence
This commit is contained in:
parent
e0f36caa70
commit
f9829d5f9e
2 changed files with 49 additions and 7 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.Numerics;
|
||||
using AcDream.App.Rendering.Scene;
|
||||
using AcDream.App.Rendering.Wb;
|
||||
using AcDream.Core.Meshing;
|
||||
using Xunit;
|
||||
|
|
@ -138,6 +139,36 @@ public class InstanceGroupClearTests
|
|||
reversedSubmission.TransparentSetDigest);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DispatcherFingerprint_ZeroVisibleInstancesIgnoresStaleGroupStorage()
|
||||
{
|
||||
WbDrawDispatcher.InstanceGroup stale = MakeCompleteGroup(
|
||||
textureHandle: 0xAA,
|
||||
submissionOrder: 0);
|
||||
var scratch = new List<WbDrawDispatcher.AlphaFingerprint>();
|
||||
|
||||
CurrentRenderDispatcherSubmission expected =
|
||||
WbDrawDispatcher.CreateDispatcherSubmission(
|
||||
visibleInstanceCount: 0,
|
||||
immediateInstanceCount: 0,
|
||||
deferTransparent: false,
|
||||
opaque: [],
|
||||
transparent: [],
|
||||
cameraWorldPosition: Vector3.Zero,
|
||||
alphaScratch: scratch);
|
||||
CurrentRenderDispatcherSubmission actual =
|
||||
WbDrawDispatcher.CreateDispatcherSubmission(
|
||||
visibleInstanceCount: 0,
|
||||
immediateInstanceCount: 0,
|
||||
deferTransparent: false,
|
||||
opaque: [stale],
|
||||
transparent: [stale],
|
||||
cameraWorldPosition: Vector3.Zero,
|
||||
alphaScratch: scratch);
|
||||
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CachedGroupHandle_RequiresLiveMatchingRegistration()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue