bigger room

This commit is contained in:
korzepadawid 2023-01-14 14:43:18 +01:00
parent a50c6b8a92
commit a655e4780e

View File

@ -74,6 +74,11 @@ glm::vec3 spotlightColor = glm::vec3(0.4, 0.4, 0.9)*3;
float spotlightPhi = 3.14 / 4; float spotlightPhi = 3.14 / 4;
glm::mat4 scaleToRoom(glm::mat4 mat)
{
return mat * glm::scale(glm::vec3(2.5f, 1.0f, 1.0f));
}
float lastTime = -1.f; float lastTime = -1.f;
float deltaTime = 0.f; float deltaTime = 0.f;
@ -202,8 +207,8 @@ void renderScene(GLFWwindow* window)
drawObjectPBR(models::marbleBustContext, glm::mat4(), glm::vec3(1.f, 1.f, 1.f), 0.5f, 1.0f); drawObjectPBR(models::marbleBustContext, glm::mat4(), glm::vec3(1.f, 1.f, 1.f), 0.5f, 1.0f);
drawObjectPBR(models::materaceContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f); drawObjectPBR(models::materaceContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f);
drawObjectPBR(models::pencilsContext, glm::mat4(), glm::vec3(0.10039f, 0.018356f, 0.001935f), 0.1f, 0.0f); drawObjectPBR(models::pencilsContext, glm::mat4(), glm::vec3(0.10039f, 0.018356f, 0.001935f), 0.1f, 0.0f);
drawObjectPBR(models::planeContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f); drawObjectPBR(models::planeContext, scaleToRoom(glm::mat4()), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
drawObjectPBR(models::roomContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f); drawObjectPBR(models::roomContext, scaleToRoom(glm::mat4()), glm::vec3(0.2f, 0.2f, 0.9f), 0.8f, 0.0f);
drawObjectPBR(models::windowContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f); drawObjectPBR(models::windowContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
glm::vec3 spaceshipSide = glm::normalize(glm::cross(spaceshipDir, glm::vec3(0.f, 1.f, 0.f))); glm::vec3 spaceshipSide = glm::normalize(glm::cross(spaceshipDir, glm::vec3(0.f, 1.f, 0.f)));