Hi everyone,
I’m currently trying to use a Render Target to create a sort of cumulative texture (basically for a fog of war system). Before setting up parameters and moving on to the important part, I wanted to test if the basic logic worked.
So I built a material that uses the Render Target multiplied by some coordinates that define where another circle should appear. This material is then used as a “brush” for a Draw Material to Render Target on the same Render Target that I’m multiplying.
The process I’m trying to achieve is:
-
Clear Render Target 2D on the Render Target at BeginPlay.
-
Create an instance of the Brush Material.
-
Start a loop:
-
Set random coordinates in the Blueprint with Set Vector Parameter Value.
-
Call Draw Material to Render Target on the same Render Target.
-
The expected result is that the Render Target should keep the previous state (circles already drawn) and add a new circle each pass, multiplying the result over and over until the screen eventually goes black after ~0.5 second intervals.
The problem: it doesn’t work. Instead, it just appears completely black right away.