Text partly invisible with P3D renderer

I suggest two modifications to @kll 's code
MOD 1
Change line
textLayer.background(0,0,80);
to
textLayer.clear();
At the moment we have a solid background so it has to be drawn before that other graphic elements, and if those elements have an opaque background then it might obscure some of the text.
If fact I would make sure all the foregorund graphic elements have a transparent background.
MOD 2
This is entirely optional but P2D and P3D are not good at rendering small size text (EDIT: I think things might have improved in this area). The font used here is sans-serif and very large so is not apparent in this sketch. This suggestion is to use JAVA2D to create the text layer i.e.
textLayer = createGraphics(iwidth, iheight, JAVA2D);

2 Likes