Problems with Nvidia RTX 3080, 3090, and 4080 when running UE4 compute shader


My team is using a compute shader in Unreal Engine 4.27 to render sprites in our game, allowing users to rotate and transform the sprites in real time without needing to pass the textures from the CPU to the GPU continuously.

This method has worked on all DX11-enabled Windows hardware that we’ve tested, except for recent Nvidia graphics cards: Nvidia RTX 3080, 3090, and 4080

Users with these Nvidia graphics cards have reported a “striping” issue where pixels are missing from the rendered sprite (as if the compute shader didn’t finish running). Here’s an example of what the issue looks like, showing some missing pixels:

We’ve disabled DX12 in the UE4 settings to make sure that all PCs are using DX11 when the compute shader is run.

I was wondering what could be different about the recent Nvidia graphics cards that would cause the compute shader to produce different results, since performance is clearly not the problem. For example, has Nvidia discontinued support for specific HLSL functions like these, or changed something about their function?

  • InterlockedAdd
  • InterlockedMin

We also use structured buffers containing structs, and we’ve been careful to follow Nvidia’s recommendations when defining those structs (padding them so that their size is divisible by 128 bits, etc, although that is probably only relevant for performance). Example from our HLSL compute shader file:

//Struct containing data used to render sprites
struct Attributes
	//Nvidia recommends aiming for structs divisible by 128 bits (the size of a float4)
	// Reference:

	//128 bits
	uint variable1;
	int variable2;
	uint variable3;
	int variable4;

	//128 bits
	int variable5;
	float variable6;
	uint variable7;
	uint variable8;

// Input buffer that can be updated each frame while the compute shader is running
StructuredBuffer<Attributes> AttributesBuffer;

Do you have any ideas about what could be going wrong, or are things I could provide to give you more information for troubleshooting?

Much appreciated,

1 Like