Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
UnrealKaraulov committed Nov 18, 2024
1 parent 6403f76 commit a5ba019
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/editor/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ vec3 ortho_offset = {};
float ortho_near = 1.0f;
float ortho_far = 262144.0f;
float ortho_fov = 45.0f;
float ortho_custom_aspect = 1.0f;
float ortho_custom_aspect = 0.0f;
float ortho_custom_w = 0.0f;
float ortho_custom_h = 0.0f;
int ortho_tga_w = 1024;
Expand Down Expand Up @@ -2805,7 +2805,7 @@ void Renderer::setupFakeOrthoView(int forceW, int forceH, vec3 bboxMin, vec3 bbo

glViewport(0, 0, windowWidth, windowHeight);

float aspect = (float)windowWidth / (float)windowHeight;
float aspect = (float)windowHeight / (float)windowWidth;

if (std::fabs(ortho_custom_aspect) > EPSILON)
aspect = ortho_custom_aspect;
Expand Down

0 comments on commit a5ba019

Please sign in to comment.