summaryrefslogtreecommitdiff
path: root/test/test-render.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-01-07 15:41:04 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-01-07 15:41:04 +0000
commit839bf2ab51c4ec55f06b4224716c564451758072 (patch)
tree63800794b1bcff504947cde45472d0c893f0aeda /test/test-render.cpp
parentmin/mag filter for shadow mapper depth map texture (diff)
downloadilt-839bf2ab51c4ec55f06b4224716c564451758072.tar.bz2
ilt-839bf2ab51c4ec55f06b4224716c564451758072.tar.xz
ilt-839bf2ab51c4ec55f06b4224716c564451758072.zip
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
Diffstat (limited to 'test/test-render.cpp')
-rw-r--r--test/test-render.cpp10
1 files changed, 5 insertions, 5 deletions
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);