Ok some more info here:
these init buffers are filled in
FRayTracingScene::Create
by a separate thread
// Fill instance upload buffer on separate thread since results are only needed in RHI thread
GraphBuilder.AddCommandListSetupTask(...)
{
...
FillRayTracingInstanceUploadBuffer(
RayTracingSceneRHI,
PreViewTranslation,
Instances,
InstanceGeometryIndices,
BaseUploadBufferOffsets,
BaseInstancePrefixSum,
NumNativeGPUSceneInstances,
NumNativeCPUInstances,
MakeArrayView(InstanceUploadData, NumNativeInstances),
MakeArrayView(TransformUploadData, NumNativeCPUInstances * 3));
...
}
so it looks like a sync issue… My plugin is marked as PostConfigInit and the shader is iexecuted during postOpaqueRender step, so I am wondering how to sync it properly