79278260

Date: 2024-12-13 12:10:47
Score: 0.5
Natty:
Report link

I remembered where I've seen solution to my question: https://learnopengl.com/Advanced-OpenGL/Blending

I just didn't sort texture by their distance to camera. Here's the code if you want tp see it:

...
const float distMc = Vector3Distance(cam.position, cam.target); // position to the guys is constant
...
float distTest = Vector3Distance(cam.position, testPos); // calculate position to the test object
//draw
BeginDrawing();

            ClearBackground(BLACK);

            BeginMode3D(cam);
                if (distMc <= distTest) {
                    DrawTexturedPlane(test, testPos);
                    DrawTexturedPlane(mc, cam.target);
                } else {
                    DrawTexturedPlane(mc, cam.target);
                    DrawTexturedPlane(test, testPos);
                }
            EndMode3D();

        EndDrawing();
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Sasha Net Official