Skip to content

Commit

Permalink
renderer: Fix camera unifs for stresstest 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
heinezen committed Jul 13, 2024
1 parent c713556 commit 36cd4d5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libopenage/renderer/demo/stresstest_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ void renderer_stresstest_1(const util::Path &path) {
"view",
camera->get_view_matrix(),
"proj",
camera->get_projection_matrix());
camera->get_projection_matrix(),
"inv_zoom",
1.0f / camera->get_zoom());
auto viewport_size = camera->get_viewport_size();
Eigen::Vector2f viewport_size_vec{
1.0f / static_cast<float>(viewport_size[0]),
1.0f / static_cast<float>(viewport_size[1])};
cam_unifs->update("inv_viewport_size", viewport_size_vec);
camera->get_uniform_buffer()->update_uniforms(cam_unifs);

// Render stages
Expand Down

0 comments on commit 36cd4d5

Please sign in to comment.