I am working on a plugin (I cannot edit the engine sources) where I need to update a view-dependant texture each frame, and use it in a material.
I use a UPrimitiveComponent
to render a mesh, shaded with the view-dependant texture on one camera, and shaded black on other views. My idea was to store the Camera’s FSceneView
I get from my proxy’s GetDynamicMeshElements()
and use it later to update the texture, when the frame is actually rendered.
However I cannot find a way to sneak in the render thread to launch each time a frame is rendered.
ENQUEUE_UNIQUE_RENDER_COMMAND
does not fit needs because the commands are executed the sooner the thread can.
Can anyone give me a lead, or maybe another approch to each my goal ? Thanks