diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-12 19:35:58 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-12 19:35:58 +0000 |
commit | 51eb25ea0f1373ca0442b02049406af38eae3b33 (patch) | |
tree | 389169a5f60d58398554168b94a0c6003302fbf6 /test | |
parent | Fix order or multiple to address reversed rotation (diff) | |
download | ilt-51eb25ea0f1373ca0442b02049406af38eae3b33.tar.bz2 ilt-51eb25ea0f1373ca0442b02049406af38eae3b33.tar.xz ilt-51eb25ea0f1373ca0442b02049406af38eae3b33.zip |
Add model support for point lights
Still invokes non-instanced point light shader
Diffstat (limited to 'test')
-rw-r--r-- | test/test-assetFactory.cpp | 1 | ||||
-rw-r--r-- | test/test-render.cpp | 30 |
2 files changed, 0 insertions, 31 deletions
diff --git a/test/test-assetFactory.cpp b/test/test-assetFactory.cpp index bc93729..9e278c4 100644 --- a/test/test-assetFactory.cpp +++ b/test/test-assetFactory.cpp @@ -48,7 +48,6 @@ public: void lights(const SceneShader & shader) const override { - shader.pointLight.add({-3, 1, 5}, {1, 1, 1}, .1F); objects.apply(&Renderable::lights, shader); } diff --git a/test/test-render.cpp b/test/test-render.cpp index 47d146c..41731dd 100644 --- a/test/test-render.cpp +++ b/test/test-render.cpp @@ -158,34 +158,4 @@ BOOST_AUTO_TEST_CASE(terrain) Texture::save(outImage, "/tmp/terrain.tga"); } -BOOST_AUTO_TEST_CASE(pointlight) -{ - SceneRenderer ss {size, output}; - ss.camera.setView({-10000, -10000, 60000}, glm::normalize(glm::vec3 {1, 1, -0.5F})); - - class PointLightScene : public TestScene { - public: - void - environment(const SceneShader &, const SceneRenderer & r) const override - { - r.setAmbientLight({0.2F, 0.2F, 0.2F}); - r.setDirectionalLight({0.2F, 0.2F, 0.2F}, west + down, *this); - } - - void - lights(const SceneShader & shader) const override - { - for (int x = 50000; x < 100000; x += 20000) { - for (int y = 50000; y < 2000000; y += 20000) { - shader.pointLight.add({x, y, 4000}, {1.0, 1.0, 1.0}, 0.1F); - } - } - } - }; - - const PointLightScene scene; - ss.render(scene); - Texture::save(outImage, "/tmp/pointlight.tga"); -} - BOOST_AUTO_TEST_SUITE_END(); |