Adapting web version

This commit is contained in:
Vladislav Khorev committed 2026-02-28 20:37:47 +03:00
1 parent 7e5aa22fee
commit 2728ca9646
16 files changed
+234 -207

No files matched your search

+4 -3
View File
@@ -362,9 +362,10 @@ void TextRenderer::drawText(const std::string& text, float x, float y, float sca
// 4. Рендеринг
r->shaderManager.PushShader(shaderName);
// Матрица проекции (экрана)
float W = (float)Environment::width;
float H = (float)Environment::height;
// Матрица проекции — используем виртуальные проекционные размеры,
// чтобы координаты текста были независимы от физического разрешения экрана.
float W = Environment::projectionWidth;
float H = Environment::projectionHeight;
Eigen::Matrix4f proj = Eigen::Matrix4f::Identity();
proj(0, 0) = 2.0f / W;
proj(1, 1) = 2.0f / H;