Create multiple CanvasRenderTarget2Ds, use one to update the other. I’m working on something that requires this. I’ll show you my setup so far.
I created a CanvasRenderTarget2D blueprint called MatRT that will draw either a static material, or a material instance dynamic.
If the CanvasRenderTarget2D is given a material instance dynamic, it updates any texture, vector or scalar parameters with this function.
Instances of MatRT are created in another blueprint that I’m using to test. This function creates an instance with a static material.
This function creates an instance with a dynamic material.
This function updates an instance with a dynamic material.
Here’s the main blueprint.
To walk you through the spaghetti, a dynamic instances of the material RMLayers is created.
Two instances of MatRT are created to draw LatLongMat and DistGrid.
A new instance of MatRT is created to draw the dynamic instance of RMlayers, with the MatRTs that draw LatLongMat and DistGrid passed as texture parameters.
An instance of MatRT is created to draw NextStep.
A dynamic instance of the material LayerCombiner is created. The MatRTs that draw RMLayers and Nextstep are set as texture parameters.
The MatRT that draws RMLayers is updated every few ticks with a dummy camera position.