Please, see the attached sample.
It tries to draw a 2d image using following shader:
//-----------------------------------------------------------------------------
// SpriteEffect.fx
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#include "Macros.fxh"
DECLARE_TEXTURE(Texture, 0);
BEGIN_CONSTANTS
MATRIX_CONSTANTS
float4x4 MatrixTransform;
float4x4 OtherTransforms[128];
int4 OtherTransformsIndices;
END_CONSTANTS
void SpriteVertexShader(inout float2 texCoord : TEXCOORD0,
inout float4 position : SV_Position)
{
position = mul(position, MatrixTransform);
position = mul(position, OtherTransforms[OtherTransformsIndices.x]);
position = mul(position, OtherTransforms[OtherTransformsIndices.y]);
position = mul(position, OtherTransforms[OtherTransformsIndices.z]);
position = mul(position, OtherTransforms[OtherTransformsIndices.w]);
}
float4 SpritePixelShader(float2 texCoord : TEXCOORD0) : SV_Target0
{
return tex2D(TextureSampler, texCoord);
}
TECHNIQUE(Default, SpriteVertexShader, SpritePixelShader);
Which is pretty much copy of the original SpriteEffect. The only difference is that it processes input position by OtherTransforms.
However all those matrices are set to Identity in the C# part of the sample, so they shouldn't affect the end result.
Unfortunately it draws nothing with the default Vulkan driver:

But works correctly when using D311 or OpenGL drivers:

Full Sample: ManyMatricesTest.zip
OS: Windows 11
Latest FNA 25.10 from the master branch
Latest fnalibs downloaded from fnalibs-daily at 15.10.2025
Please, see the attached sample.
It tries to draw a 2d image using following shader:
Which is pretty much copy of the original SpriteEffect. The only difference is that it processes input position by OtherTransforms.
However all those matrices are set to Identity in the C# part of the sample, so they shouldn't affect the end result.
Unfortunately it draws nothing with the default Vulkan driver:

But works correctly when using D311 or OpenGL drivers:

Full Sample: ManyMatricesTest.zip
OS: Windows 11
Latest FNA 25.10 from the master branch
Latest fnalibs downloaded from fnalibs-daily at 15.10.2025