Skip to content

Commit

Permalink
fix(rendering): calculation of split screen split size
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuritsu committed Sep 29, 2024
1 parent 5997e01 commit 10d74a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Generic Camera component to hold projection matrix (#1331, **@mkuritsu**)
- Initial application debugging through Tesseratos (#1303, **@RiscadoA**).
- Print stacktrace with *cpptrace* on calls to CUBOS_FAIL (#1172, **@RiscadoA**).
- OrthographicCamera component (#1335, **@mkuritsu**)
- Orthographic Camera component (#1182, **@mkuritsu**).

### Fixed

- Spot light angle mismatch between light and shadows (#1310, **@tomas7770**).
- Spot shadows cause light range cutoff (#1312, **@tomas7770**).
- Precision error in split screen size calculations (**@mkuritsu**).

## [v0.3.0] - 2024-08-02

Expand Down
4 changes: 2 additions & 2 deletions engine/src/render/split_screen/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ static void setViewportCameras(glm::ivec2 position, glm::ivec2 size, int count,
// Split along the largest axis.
if (size.x > size.y)
{
splitSize = {size.x / 2, size.y};
splitSize = {(size.x + 1) / 2, size.y};

Check warning on line 38 in engine/src/render/split_screen/plugin.cpp

View check run for this annotation

Codecov / codecov/patch

engine/src/render/split_screen/plugin.cpp#L38

Added line #L38 was not covered by tests
splitOffset = {size.x / 2, 0};
}
else
{
splitSize = {size.x, size.y / 2};
splitSize = {size.x, (size.y + 1) / 2};

Check warning on line 43 in engine/src/render/split_screen/plugin.cpp

View check run for this annotation

Codecov / codecov/patch

engine/src/render/split_screen/plugin.cpp#L43

Added line #L43 was not covered by tests
splitOffset = {0, size.y / 2};
}

Expand Down

0 comments on commit 10d74a5

Please sign in to comment.