From 839bf2ab51c4ec55f06b4224716c564451758072 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 7 Jan 2023 15:41:04 +0000 Subject: Only generate the first N shadow maps which are useful Note: we don't yet optimise the use of the shadow map texture, each still renders into its own corner --- test/test-render.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/test-render.cpp') diff --git a/test/test-render.cpp b/test/test-render.cpp index 1cad732..09aa9fb 100644 --- a/test/test-render.cpp +++ b/test/test-render.cpp @@ -53,15 +53,15 @@ BOOST_DATA_TEST_CASE(cam, * boost::unit_test::data::xrange(50.F, 500.F, 70.F), dist, near, far) { - static constexpr glm::vec3 pos {-10, -10, 60}; + static constexpr glm::vec4 pos {-10, -10, 60, 0}; Camera cam {pos, half_pi, 1.f, near, far}; const auto e = cam.extentsAtDist(dist); - BOOST_CHECK_CLOSE_VEC(e[0], pos + glm::vec3(-dist, dist, -dist)); - BOOST_CHECK_CLOSE_VEC(e[1], pos + glm::vec3(-dist, dist, dist)); - BOOST_CHECK_CLOSE_VEC(e[2], pos + glm::vec3(dist, dist, -dist)); - BOOST_CHECK_CLOSE_VEC(e[3], pos + glm::vec3(dist, dist, dist)); + BOOST_CHECK_CLOSE_VEC(e[0], pos + glm::vec4(-dist, dist, -dist, dist)); + BOOST_CHECK_CLOSE_VEC(e[1], pos + glm::vec4(-dist, dist, dist, dist)); + BOOST_CHECK_CLOSE_VEC(e[2], pos + glm::vec4(dist, dist, -dist, dist)); + BOOST_CHECK_CLOSE_VEC(e[3], pos + glm::vec4(dist, dist, dist, dist)); } BOOST_FIXTURE_TEST_SUITE(w, TestRenderOutput); -- cgit v1.2.3