i hope it works this time

This commit is contained in:
korzepadawid 2023-02-12 21:45:32 +01:00
parent a7a99a2bd8
commit 65286f2b54
17 changed files with 11341 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 MiB

View File

@ -0,0 +1,14 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl Sofa_01
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Bump C:\\Users\\korze\\AppData\\Local\\Temp\\Temp1_Sofa_01_4k.blend.zip\\textures\\Sofa_01_nor_gl_4k.exr
map_Kd brown_leather_albedo_4k.jpg

11308
cw 9/models/sofa/sofa2.obj Normal file

File diff suppressed because it is too large Load Diff

View File

@ -105,6 +105,10 @@ namespace texture {
GLuint red;
GLuint redNormal;
GLuint redARM;
GLuint redLeather;
GLuint redLeatherNormal;
GLuint redLeatherARM;
}
Core::RenderContext cubeContext;
@ -343,6 +347,7 @@ void renderShadowapSun(GLuint depthFBO, glm::mat4 light) {
glm::translate(pointlightPos) * glm::scale(glm::vec3(0.1)) * glm::eulerAngleY(time / 3) * glm::translate(glm::vec3(4.f, 0, 0)) * glm::eulerAngleY(time) * glm::translate(glm::vec3(1.f, 0, 0)) * glm::scale(glm::vec3(0.1f)));
drawObjectDepth(models::couchContext, light, glm::scale(glm::vec3(0.5f)) * glm::translate(glm::vec3(8.4f, 0, -0.4f)) * glm::eulerAngleY(3.15f));
drawObjectDepth(models::couchContext, light, glm::eulerAngleY(3.14f));
drawObjectDepth(models::coffeeTableContext, light, glm::translate(glm::vec3(2.8f, 0, 0.5f)));
drawObjectDepth(models::doorContext, light, glm::mat4());
drawObjectDepth(models::planeContext, light, glm::mat4());
@ -536,13 +541,12 @@ void renderScene(GLFWwindow* window)
glUseProgram(program);
//drawObjectPBR(models::couchContext, glm::scale(glm::vec3(0.5f)) * glm::translate(glm::vec3(8.4f, 0, -0.4f)) * glm::eulerAngleY(3.15f), glm::vec3(0.03f, 0.03f, 0.03f), 0.2f, 0.0f);
drawObjectPBR(models::coffeeTableContext, glm::translate(glm::vec3(2.8f, 0, 0.5f)), texture::white, texture::whiteNormal, texture::whiteARM);
drawObjectPBR(models::coffeeTableContext, glm::translate(glm::vec3(2.8f, 0, 0.5f)), texture::wood, texture::woodNormal, texture::woodARM);
drawObjectPBR(models::doorContext, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM);
drawObjectPBR(models::planeContext, glm::mat4(), texture::floor, texture::floorNormal, texture::floorARM);
drawObjectPBR(models::roomContext, glm::mat4(), texture::brick, texture::brickNormal, texture::brickARM);
drawObjectPBR(models::roofContext, glm::mat4(), texture::roof, texture::roofNormal, texture::roofARM);
drawObjectPBR(models::deskContext, glm::eulerAngleY(3.14f) * glm::translate(glm::vec3(2.8f, 0.0f, 1.9f)), texture::wood2, texture::woodNormal2, texture::woodARM2);
drawObjectPBR(models::deskContext, glm::eulerAngleY(3.14f) * glm::translate(glm::vec3(2.8f, 0.0f, 1.9f)), texture::wood, texture::woodNormal, texture::woodARM);
drawObjectPBR(models::displayScreenContext, glm::scale(glm::vec3(0.1, 0.1, 0.1)) * glm::translate(glm::vec3(-28.5f, 9.0f, -20.0f)), texture::black, texture::blackNormal, texture::blackARM);
drawObjectPBR(models::chairContext, glm::scale(glm::vec3(1.0f, 1.2f, 1.0f)) * glm::eulerAngleY(3.14f) * glm::translate(glm::vec3(2.8f, 0.0f, 1.5f)), texture::wood, texture::woodNormal, texture::woodARM);
@ -550,14 +554,15 @@ void renderScene(GLFWwindow* window)
drawObjectPBR(models::ps5Context, glm::mat4(), texture::black, texture::blackNormal, texture::blackARM);
drawObjectPBR(models::tvStandContext, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM);
drawObjectPBR(models::carpetContext, glm::mat4(), texture::carpet, texture::carpetNormal, texture::carpetARM);
drawObjectPBR(models::cabinet1Context, glm::mat4(), texture::wood3, texture::woodNormal3, texture::woodARM3);
drawObjectPBR(models::cabinet1Context, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM);
drawObjectPBR(models::cabinet2Context, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM);
drawObjectPBR(models::lampContext, glm::translate(glm::vec3(0.022f, 0.15f, 0.04f)), texture::black, texture::blackNormal, texture::blackARM);
drawObjectPBR(models::bookshelfContext, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM);
drawObjectPBR(models::lightSwitchContext, glm::mat4(), texture::white, texture::whiteNormal, texture::whiteARM);
drawObjectPBR(models::easelContext, glm::mat4(), texture::wood2, texture::woodNormal2, texture::woodARM2);
drawObjectPBR(models::easelContext, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM);
drawObjectPBR(models::carContext, glm::translate(carPosTranform), texture::red, texture::redNormal, texture::redARM);
drawObjectPBR(models::vaseContext, glm::translate(glm::vec3(1.1f, 1.41f, -2.2f)), texture::vase, texture::vaseNormal, texture::vaseARM);
drawObjectPBR(models::couchContext, glm::eulerAngleY(3.14f), texture::redLeather, texture::redLeatherNormal, texture::redLeatherARM);
// draw windows
drawObjectPBR(models::windowContext, glm::scale(glm::vec3(1.0f, 1.0f, 2.3f)) * glm::translate(glm::vec3(-2.9f, 0, -0.2f)), texture::wood, texture::woodNormal, texture::woodARM);
@ -672,9 +677,9 @@ void init(GLFWwindow* window)
texture::blackNormal = Core::LoadTexture("textures/black/black_normal.png");
texture::blackARM = Core::LoadTexture("textures/black/black_arm.png");
texture::vase = Core::LoadTexture("textures/vase/vase.png");
texture::vaseNormal = Core::LoadTexture("textures/vase/vase_normal.png");
texture::vaseARM = Core::LoadTexture("textures/vase/vase_arm.png");
texture::vase = Core::LoadTexture("textures/vase/vase.jpg");
texture::vaseNormal = Core::LoadTexture("textures/vase/vase_normal.jpg");
texture::vaseARM = Core::LoadTexture("textures/vase/vase_arm.jpg");
texture::white = Core::LoadTexture("textures/white/white.png");
texture::whiteNormal = Core::LoadTexture("textures/white/white_normal.png");
@ -684,9 +689,14 @@ void init(GLFWwindow* window)
texture::whiteNormal = Core::LoadTexture("textures/red/red_normal.png");
texture::whiteARM = Core::LoadTexture("textures/red/red_arm.png");
texture::redLeather = Core::LoadTexture("textures/leather/leather_red_03_coll1_4k.png");
texture::redLeatherNormal = Core::LoadTexture("textures/leather/leather_red_03_nor_gl_4k.png");
texture::redLeatherARM = Core::LoadTexture("textures/leather/leather_red_03_arm_4k.png");
loadModelToContext("./models/sphere.obj", sphereContext);
loadModelToContext("./models/cube.obj", cubeContext);
loadModelToContext("./models/couch.obj", models::couchContext);
loadModelToContext("./models/sofa/sofa2.obj", models::couchContext);
loadModelToContext("./models/coffeeTable.obj", models::coffeeTableContext);
loadModelToContext("./models/door.obj", models::doorContext);
loadModelToContext("./models/drawer.obj", models::drawerContext);

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 MiB

After

Width:  |  Height:  |  Size: 25 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB

BIN
cw 9/textures/vase/vase.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 MiB