Passing data from GameThread to Render thread.

I’ve used a dynamic material to send a 100x1 texture and never noticed a delay that big. There is a small delay, but I would never describe it as “noticeable”. The delay you might see when sending the mouse cursor position on event tick to the material is due to a software limitation. See the following discussion: Mouse cursor lag (very noticable).

In the UnrealEngine bug tracker, the developers responded to this issue as follows:

In my previous answer here I mentioned using ResolvedView.CursorPosition in the custom node expression, right inside the material. I find this to be the fastest way since you just get the cursor position from the buffer directly without having to pass the data yourself at all. You most likely won’t be able to have a faster approach.

Comment: I’ve also had some issues in the past that I wanted to solve by passing parameters to the shader directly. To be honest, I haven’t come anywhere close. I’ve come to the conclusion that you’d probably have to modify the source code or write a hell of a lot of code to make it possible. What you’ve done doesn’t seem wrong as a first step, but then you’d need to pass those parameters to the correct “pass” which is done in some source code file. You could try looking at how it’s done in the “…\Runtime\Renderer\Private\BasePassRendering.cpp” file, I believe the function “AddPass” is used to send the parameters to the rendering thread, but I’m not 100% sure that’s the right file for the post-processing pass. So… Before you try to continue doing what you’re doing, check what the actual problem is first. Because I don’t think you want to do all that hard work to get something other than what you originally wanted.

1 Like