Less lights but more powerful ones in the cube scenes, to serve as a better comparison between the two types of lighting shading.

This commit is contained in:
Hurlu 2019-06-18 18:40:00 +09:00
parent 93271a1113
commit 253df31799
2 changed files with 10 additions and 6 deletions

View File

@ -116,11 +116,11 @@ void MyGlWindow::loadScene(SceneChoice scene)
}
}
for (int i = 0; i < 64; i++)
for (int i = 0; i < 5; i++)
{
float light_r = (std::rand() % 10) / 100.f;
float light_g = (std::rand() % 10) / 100.f;
float light_b = (std::rand() % 10) / 100.f;
float light_r = (std::rand() % 60) / 100.f;
float light_g = (std::rand() % 60) / 100.f;
float light_b = (std::rand() % 60) / 100.f;
scnctx.lights.emplace_back(glm::vec3(light_r, light_g, light_b),
glm::vec4(std::rand() % 40 - 20, std::rand() % 3 + 3, std::rand() % 40 - 20, 1));
}
@ -134,18 +134,22 @@ void MyGlWindow::loadScene(SceneChoice scene)
moddata.simpleCube();
meshes.emplace_back(std::make_shared<Mesh>(moddata, "DSGeometryPass.vert", "DSGeometryPass.frag"));
meshes[meshes.size() - 1]->textures["0"] = scnctx.textures["DefaultTex"];
meshes[meshes.size() - 1]->addStartTranslation(glm::vec4(-30, 0, 0, 0));
meshes[meshes.size() - 1]->addStartScaling(glm::vec4(1, 5, 30, 0));
meshes.emplace_back(std::make_shared<Mesh>(moddata, "DSGeometryPass.vert", "DSGeometryPass.frag"));
meshes[meshes.size() - 1]->textures["0"] = scnctx.textures["DefaultTex"];
meshes[meshes.size() - 1]->addStartTranslation(glm::vec4(30, 0, 0, 0));
meshes[meshes.size() - 1]->addStartScaling(glm::vec4(1, 5, 30, 0));
meshes.emplace_back(std::make_shared<Mesh>(moddata, "DSGeometryPass.vert", "DSGeometryPass.frag"));
meshes[meshes.size() - 1]->textures["0"] = scnctx.textures["DefaultTex"];
meshes[meshes.size() - 1]->addStartTranslation(glm::vec4(0, 0, 30, 0));
meshes[meshes.size() - 1]->addStartScaling(glm::vec4(30, 5, 1, 0));
meshes.emplace_back(std::make_shared<Mesh>(moddata, "DSGeometryPass.vert", "DSGeometryPass.frag"));
meshes[meshes.size() - 1]->textures["0"] = scnctx.textures["DefaultTex"];
meshes[meshes.size() - 1]->addStartTranslation(glm::vec4(0, 0, -30, 0));
meshes[meshes.size() - 1]->addStartScaling(glm::vec4(30, 5, 1, 0));

View File

@ -84,7 +84,7 @@ Size=32,32
Collapsed=0
[Window][Light management]
Pos=-7,119
Size=443,328
Pos=422,2
Size=475,163
Collapsed=0