Hi,
I’m trying to run a simple test of compute shader on mobile (android),
#include "/Engine/Public/Platform.ush"
RWStructuredBuffer<int> Buff;
int Incr;
[numthreads(16, 1, 1)]
void MainComputeShader(uint3 ThreadId : SV_DispatchThreadID)
{
int index = ThreadId.x;
Buff[index] = Buff[index] + Incr;
}
However, the shader do not compile for OpoenGLES3_1, it seems that the RWStructuredBuffer isn’t supported by unreal because all the RWStructuredBuffer variables raise an undeclared error when I build to my android
EDIT: I testedRWStructuredBuffer<int>
it does work nicely, but RWStructuedBuffer<float3>
doesn’t. Basically all “struct types” do not work
For vulkan the shader compile fine, but the shader doesn’t write back into the Buffer, the Buffer doesn’t get changed after extraction
(I’ve tested the shader and it works fine when played on the editor)
Is there any way to make this compute shader work on android ?
Thanks