Close objects make z-buffering remove text from GUI

Hi,

For already a quite long time, there has been a graphical glitch in my game, but I haven’t been able to find it’s cause, so today I’ve decided to finally ask about it.

When I am close to an object (can be anything: a wall, the surface of the water, or like in the screenshot, a tree, and everyhting else), a part of the text layer of the GUI is cut off.
The GUI is made mostli with nifty GUI, and the bug only happens to that part of the GUI made with nifty GUI. It happens to all text that is within a certain distance from the closest polygon, and only to the text. stuff like buttons will remain fully drawn when their text is cut off.

I have included a screenshot to make it more clear what I mean:
A screenshot of the bug

Does anyone know how this can be fixed?

Never seen that myself, the first thing I can think of tho is:

Make sure the nifty gui is attached to the gui viewport not the main one.

Make sure the depth buffer is being cleared on the gui viewport.

It’s an issue in RC2 that has been fixed