Below is the Blueprint code demonstrating the bug:
I have two Render Targets, A and B.
- At the start of each frame, I first copy the contents of B to A (using
UKismetRenderingLibrary::DrawMaterialToRenderTarget
). - Then, I render a default texture (
DefaultTexture
) at the center position on A (usingUCanvas::K2_DrawTexture
). - Finally, I copy the contents of A to B (using
UKismetRenderingLibrary::DrawMaterialToRenderTarget
).
The Material used for copying simply offsets the Render Target’s coordinates slightly and then outputs the sampled pixel value to the Emissive Color.
The expected effect is that the
DefaultTexture
will tile diagonally across A and B.It runs fine on the PC platform, achieving the expected result. If I change the platform preview to Android ES3_1, it also works well. However, once I enable the “Enable GPUScene on Mobile” option, a bug appears on Android ES3_1, while the PC remains correct.
Under Android ES3_1, you will find that only one DefaultTexture
appears on both A and B.
Further testing revealed that in the first step, i.e., the call where B is copied to A, the Render Target (B) read inside the Material has no data.
What could be the reason for this? Is this a bug in UE? It occurs in versions 5.0 to 5.2. Thank you.