2025-08-14 3:27 AM
Hello,
I’m running a TouchGFX application on LTDC Layer 2 with pixel format ARGB8888.
Underneath it, on LTDC Layer 1, I have a simple colored rectangle as a background.
I have configured the LTDC blending factors for per-pixel alpha, and the blending works — for example, when I set Layer 2’s constant alpha to zero, I can see Layer 1 correctly.
However, even when using images with transparent areas in TouchGFX, the “transparent” parts appear as solid black on the screen and completely block Layer 1. It seems that TouchGFX is filling those pixels with an opaque color (alpha 255) instead of leaving them transparent (alpha 0).
What I expect is that transparent parts of the UI would allow Layer 1 to show through, but instead they are rendered as black.
Is this the expected behavior for TouchGFX? If so, is there a supported way to make untouched areas of the framebuffer remain transparent so that hardware blending between Layer 2 and Layer 1 works as intended?
Thanks in advance.
2025-08-22 6:30 AM
In the example project I shared, the buffers are used dynamically in this pattern:
Buffer 1: Video write
Buffer 2: TouchGFX read
Buffer 3: Standby
When the Camera finish writing a frame before, the buffers will be swapped to this configuration:
Buffer 1: Standby
Buffer 2: TouchGFX read
Buffer 3: Video write
When TouchGFX ticks, it will swap to reading from the Standby buffer (if this is never than what it currently is reading):
Buffer 1: TouchGFX read
Buffer 2: Standby
Buffer 3: Video write
This way, the camera will always have a buffer to write data to, and TouchGFX will always have a complete video frame to read from.
2025-08-22 7:42 AM
Thank you, now I completely understand. I will share the results after I try it.