fix #451: stabilize portal seam rendering
All checks were successful
CI / linux-portable (push) Successful in 3m32s
CI / windows-gate (push) Successful in 6m55s
CI / release (push) Successful in 2m12s

This commit is contained in:
Erik 2026-08-27 14:30:21 +02:00
parent f6fe0f2a4f
commit 1d2f2f738f
29 changed files with 1650 additions and 239 deletions

View file

@ -14,11 +14,15 @@ public sealed class ParticleBindlessInstanceTests
// one TextureIndex (a binding=9 handle-table slot, 4 bytes), so the
// struct shrank by 4 bytes; TextureIndex keeps TextureHandleLow's
// former offset (64 — right after the four vec4 fields).
Assert.Equal(68, Marshal.SizeOf<ParticleRenderer.BillboardGpuInstance>());
Assert.Equal(72, Marshal.SizeOf<ParticleRenderer.BillboardGpuInstance>());
Assert.Equal(
new IntPtr(64),
Marshal.OffsetOf<ParticleRenderer.BillboardGpuInstance>(
nameof(ParticleRenderer.BillboardGpuInstance.TextureIndex)));
Assert.Equal(
new IntPtr(68),
Marshal.OffsetOf<ParticleRenderer.BillboardGpuInstance>(
nameof(ParticleRenderer.BillboardGpuInstance.ClipSlot)));
}
[Fact]
@ -40,6 +44,8 @@ public sealed class ParticleBindlessInstanceTests
// index rather than by a null handle, because Vulkan's descriptor array
// cannot be asked whether an element was ever written.
Assert.Contains("layout(location = 6) in uint aTextureIndex;", vertex);
Assert.Contains("layout(location = 7) in uint aClipSlot;", vertex);
Assert.Contains("clipRegions[aClipSlot]", vertex);
Assert.Contains("flat out uint vTextureIndex;", vertex);
Assert.Contains("vTextureIndex = aTextureIndex;", vertex);
Assert.Contains("#extension GL_ARB_bindless_texture : require", fragment);