Drawable not rendered when close to camera

I have custom geometry (RichText3D) which uses multiple Drawable objects to create text and images. Everything works fine on DirectX/OpenGL, however, on GLES2 (RockPro64 board with ARM soc), the Drawable is not rendered. When I move the camera backwards a bit, it renders fine. My near/far clip planes are 0.1 / 100 and it doesn’t seem related.

Notice that if I move the camera to look just a bit up or down away from the text, it disappears. I cannot reproduce this problem on PC and debugging is hard since the project is cross-compiled on GitLab CI/CD.

void FrustumOctreeQuery::TestDrawables(Drawable** start, Drawable** end, bool inside)
{
    while (start != end)
    {
        Drawable* drawable = *start++;

        if ((drawable->GetDrawableFlags() & drawableFlags_) && (drawable->GetViewMask() & viewMask_))
        {
            if (inside || frustum_.IsInsideFast(drawable->GetWorldBoundingBox()))
                result_.Push(drawable);
        }
    }
}

It looks like this code is completely ignoring my drawable, but its world bouding box is valid.

That actually fixes my problem, thanks @Eugene :

worldBoundingBox_.Define(-M_LARGE_VALUE, M_LARGE_VALUE);

But I still am trying to understand why is it happening, the world bounding box seems perfectly fine when I draw it using the DebugRenderer.

1 Like