Dodanie większości modeli
12
cw 9/models/bed.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.011
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/dark_oak.jpg
|
12
cw 9/models/books.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.017
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/books texture.png
|
12
cw 9/models/cactus.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.015
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/cactus texture.png
|
12
cw 9/models/chair.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.014
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/chair texture.png
|
12
cw 9/models/desk.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.001
|
||||||
|
Ns 4.846980
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.177215 0.177215 0.177215
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/dark_oak.jpg
|
22
cw 9/models/desklamp.mtl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.013
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/desk lamp texture.png
|
||||||
|
|
||||||
|
newmtl Material.019
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/desk lamp texture.png
|
12
cw 9/models/door.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.007
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/doorTexture.png
|
2
cw 9/models/doorframe.mtl
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
12
cw 9/models/floorthing.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.010
|
||||||
|
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
|
12
cw 9/models/lamp.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.016
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/lamp texture.png
|
12
cw 9/models/laptop.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.018
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/macbook texture.png
|
12
cw 9/models/materace.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.009
|
||||||
|
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
|
12
cw 9/models/painting.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/paintingBigTexture.png
|
12
cw 9/models/pstryczek.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.012
|
||||||
|
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
|
BIN
cw 9/models/room.fbx
Normal file
12
cw 9/models/room.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.005
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/source/repos/ProjektGrafika/cw 9/textures/room.png
|
2
cw 9/models/shelf.mtl
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
12
cw 9/models/wardrobe.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.004
|
||||||
|
Ns 5.768307
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.284810 0.284810 0.284810
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/dark_oak.jpg
|
12
cw 9/models/wardrobeDoorLeft.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.003
|
||||||
|
Ns 0.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.554348 0.554348 0.554348
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/dark_oak.jpg
|
12
cw 9/models/wardrobeDoorRight.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.003
|
||||||
|
Ns 0.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Ks 0.554348 0.554348 0.554348
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd C:/Users/obses/Downloads/dark_oak.jpg
|
22
cw 9/models/window.mtl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.006
|
||||||
|
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
|
||||||
|
|
||||||
|
newmtl Material.008
|
||||||
|
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
|
12
cw 9/models/windowsill.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'room.blend'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Material.008
|
||||||
|
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
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "Shader_Loader.h"
|
#include "Shader_Loader.h"
|
||||||
#include "Render_Utils.h"
|
#include "Render_Utils.h"
|
||||||
//#include "Texture.h"
|
#include "Texture.h"
|
||||||
|
|
||||||
#include "Box.cpp"
|
#include "Box.cpp"
|
||||||
#include <assimp/Importer.hpp>
|
#include <assimp/Importer.hpp>
|
||||||
@ -20,22 +20,53 @@ const unsigned int SHADOW_WIDTH = 1024, SHADOW_HEIGHT = 1024;
|
|||||||
int WIDTH = 500, HEIGHT = 500;
|
int WIDTH = 500, HEIGHT = 500;
|
||||||
|
|
||||||
namespace models {
|
namespace models {
|
||||||
Core::RenderContext bedContext;
|
|
||||||
Core::RenderContext chairContext;
|
|
||||||
Core::RenderContext deskContext;
|
|
||||||
Core::RenderContext doorContext;
|
|
||||||
Core::RenderContext drawerContext;
|
|
||||||
Core::RenderContext marbleBustContext;
|
|
||||||
Core::RenderContext materaceContext;
|
|
||||||
Core::RenderContext pencilsContext;
|
|
||||||
Core::RenderContext planeContext;
|
|
||||||
Core::RenderContext roomContext;
|
Core::RenderContext roomContext;
|
||||||
Core::RenderContext spaceshipContext;
|
Core::RenderContext mattressContext;
|
||||||
Core::RenderContext sphereContext;
|
Core::RenderContext bedContext;
|
||||||
|
Core::RenderContext wardrobeContext;
|
||||||
|
Core::RenderContext wardrobeDoorLeftContext;
|
||||||
|
Core::RenderContext wardrobeDoorRightContext;
|
||||||
|
Core::RenderContext deskContext;
|
||||||
|
Core::RenderContext chairContext;
|
||||||
Core::RenderContext windowContext;
|
Core::RenderContext windowContext;
|
||||||
Core::RenderContext testContext;
|
Core::RenderContext shelfContext;
|
||||||
|
Core::RenderContext lampContext;
|
||||||
|
Core::RenderContext windowsillContext;
|
||||||
|
Core::RenderContext paintingContext;
|
||||||
|
Core::RenderContext doorContext;
|
||||||
|
Core::RenderContext doorframeContext;
|
||||||
|
Core::RenderContext floorthingContext;
|
||||||
|
Core::RenderContext booksContext;
|
||||||
|
Core::RenderContext laptopContext;
|
||||||
|
Core::RenderContext pstryczekContext;
|
||||||
|
Core::RenderContext cactusContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace texture {
|
||||||
|
GLuint room;
|
||||||
|
GLuint bed;
|
||||||
|
GLuint mattress;
|
||||||
|
GLuint wardrobe;
|
||||||
|
GLuint wardrobeDoorLeft;
|
||||||
|
GLuint wardrobeDoorRight;
|
||||||
|
GLuint desk;
|
||||||
|
GLuint chair;
|
||||||
|
GLuint oak;
|
||||||
|
GLuint window;
|
||||||
|
GLuint windowsill;
|
||||||
|
GLuint shelf;
|
||||||
|
GLuint lamp;
|
||||||
|
GLuint painting;
|
||||||
|
GLuint door;
|
||||||
|
GLuint doorframe;
|
||||||
|
GLuint floorthing;
|
||||||
|
GLuint books;
|
||||||
|
GLuint cactus;
|
||||||
|
GLuint pstryczek;
|
||||||
|
GLuint laptop;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
GLuint depthMapFBO;
|
GLuint depthMapFBO;
|
||||||
GLuint depthMap;
|
GLuint depthMap;
|
||||||
|
|
||||||
@ -213,17 +244,26 @@ void renderShadowapSun(glm::mat4 lightViewPointMatrix) {
|
|||||||
glUseProgram(programDepth);
|
glUseProgram(programDepth);
|
||||||
|
|
||||||
// umieszczenie w mapie wszystkich modeli które mają rzucać cień
|
// umieszczenie w mapie wszystkich modeli które mają rzucać cień
|
||||||
drawObjectDepth(models::bedContext, glm::mat4(), lightViewPointMatrix);
|
|
||||||
drawObjectDepth(models::chairContext, glm::mat4(), lightViewPointMatrix);
|
|
||||||
drawObjectDepth(models::deskContext, glm::mat4(), lightViewPointMatrix);
|
|
||||||
drawObjectDepth(models::doorContext, glm::mat4(), lightViewPointMatrix);
|
|
||||||
drawObjectDepth(models::drawerContext, glm::mat4(), lightViewPointMatrix);
|
|
||||||
drawObjectDepth(models::marbleBustContext, glm::mat4(), lightViewPointMatrix);
|
|
||||||
drawObjectDepth(models::materaceContext, glm::mat4(), lightViewPointMatrix);
|
|
||||||
drawObjectDepth(models::pencilsContext, glm::mat4(), lightViewPointMatrix);
|
|
||||||
drawObjectDepth(models::planeContext, glm::mat4(), lightViewPointMatrix);
|
|
||||||
drawObjectDepth(models::roomContext, glm::mat4(), lightViewPointMatrix);
|
drawObjectDepth(models::roomContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::bedContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::mattressContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::wardrobeContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::wardrobeDoorLeftContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::wardrobeDoorRightContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::deskContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::chairContext, glm::mat4(), lightViewPointMatrix);
|
||||||
drawObjectDepth(models::windowContext, glm::mat4(), lightViewPointMatrix);
|
drawObjectDepth(models::windowContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::windowsillContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::shelfContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::lampContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::paintingContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::doorContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::doorframeContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::floorthingContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::laptopContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::pstryczekContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::cactusContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
drawObjectDepth(models::booksContext, glm::mat4(), lightViewPointMatrix);
|
||||||
|
|
||||||
glUseProgram(0);
|
glUseProgram(0);
|
||||||
|
|
||||||
@ -258,17 +298,26 @@ void renderScene(GLFWwindow* window)
|
|||||||
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)),
|
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)),
|
||||||
glm::vec3(0.5, 0.5, 0.5), 0.7, 0.0);
|
glm::vec3(0.5, 0.5, 0.5), 0.7, 0.0);
|
||||||
|
|
||||||
drawObjectPBR(models::bedContext, glm::mat4(), glm::vec3(0.03f, 0.03f, 0.03f), 0.2f, 0.0f);
|
drawObjectPBR(models::roomContext, glm::mat4(), glm::vec3(0.1, 0.4, 0.6), 0.8f, 0.0f);
|
||||||
drawObjectPBR(models::chairContext, glm::mat4(), glm::vec3(0.195239f, 0.37728f, 0.8f), 0.4f, 0.0f);
|
drawObjectPBR(models::bedContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
drawObjectPBR(models::deskContext, glm::mat4(), glm::vec3(0.428691f, 0.08022f, 0.036889f), 0.2f, 0.0f);
|
drawObjectPBR(models::mattressContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
drawObjectPBR(models::doorContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
drawObjectPBR(models::wardrobeContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
drawObjectPBR(models::drawerContext, glm::mat4(), glm::vec3(0.428691f, 0.08022f, 0.036889f), 0.2f, 0.0f);
|
drawObjectPBR(models::wardrobeDoorLeftContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
drawObjectPBR(models::marbleBustContext, glm::mat4(), glm::vec3(1.f, 1.f, 1.f), 0.5f, 1.0f);
|
drawObjectPBR(models::wardrobeDoorRightContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
drawObjectPBR(models::materaceContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f);
|
drawObjectPBR(models::deskContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
drawObjectPBR(models::pencilsContext, glm::mat4(), glm::vec3(0.10039f, 0.018356f, 0.001935f), 0.1f, 0.0f);
|
drawObjectPBR(models::chairContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
drawObjectPBR(models::planeContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
drawObjectPBR(models::windowContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
drawObjectPBR(models::roomContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f);
|
drawObjectPBR(models::windowsillContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
drawObjectPBR(models::windowContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
drawObjectPBR(models::shelfContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
|
drawObjectPBR(models::lampContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
|
drawObjectPBR(models::paintingContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
|
drawObjectPBR(models::doorContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
|
drawObjectPBR(models::doorframeContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
|
drawObjectPBR(models::floorthingContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
|
drawObjectPBR(models::booksContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
|
drawObjectPBR(models::cactusContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
|
drawObjectPBR(models::laptopContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 0.0f);
|
||||||
|
drawObjectPBR(models::pstryczekContext, glm::mat4(), glm::vec3(1, 1, 1), 0.8f, 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)));
|
||||||
glm::vec3 spaceshipUp = glm::normalize(glm::cross(spaceshipSide, spaceshipDir));
|
glm::vec3 spaceshipUp = glm::normalize(glm::cross(spaceshipSide, spaceshipDir));
|
||||||
@ -340,24 +389,36 @@ void init(GLFWwindow* window)
|
|||||||
// program odpowiadający za generowanie mapy głębokości
|
// program odpowiadający za generowanie mapy głębokości
|
||||||
programDepth = shaderLoader.CreateProgram("shaders/shader_depth.vert", "shaders/shader_depth.frag");
|
programDepth = shaderLoader.CreateProgram("shaders/shader_depth.vert", "shaders/shader_depth.frag");
|
||||||
|
|
||||||
loadModelToContext("./models/sphere.obj", sphereContext);
|
|
||||||
loadModelToContext("./models/spaceship.obj", shipContext);
|
|
||||||
|
|
||||||
|
|
||||||
loadModelToContext("./models/bed.obj", models::bedContext);
|
|
||||||
loadModelToContext("./models/chair.obj", models::chairContext);
|
|
||||||
loadModelToContext("./models/desk.obj", models::deskContext);
|
|
||||||
loadModelToContext("./models/door.obj", models::doorContext);
|
|
||||||
loadModelToContext("./models/drawer.obj", models::drawerContext);
|
|
||||||
loadModelToContext("./models/marbleBust.obj", models::marbleBustContext);
|
|
||||||
loadModelToContext("./models/materace.obj", models::materaceContext);
|
|
||||||
loadModelToContext("./models/pencils.obj", models::pencilsContext);
|
|
||||||
loadModelToContext("./models/plane.obj", models::planeContext);
|
|
||||||
loadModelToContext("./models/room.obj", models::roomContext);
|
loadModelToContext("./models/room.obj", models::roomContext);
|
||||||
loadModelToContext("./models/spaceship.obj", models::spaceshipContext);
|
loadModelToContext("./models/bed.obj", models::bedContext);
|
||||||
loadModelToContext("./models/sphere.obj", models::sphereContext);
|
loadModelToContext("./models/materace.obj", models::mattressContext);
|
||||||
|
loadModelToContext("./models/wardrobe.obj", models::wardrobeContext);
|
||||||
|
loadModelToContext("./models/wardrobeDoorLeft.obj", models::wardrobeDoorLeftContext);
|
||||||
|
loadModelToContext("./models/wardrobeDoorRight.obj", models::wardrobeDoorRightContext);
|
||||||
|
loadModelToContext("./models/desk.obj", models::deskContext);
|
||||||
|
loadModelToContext("./models/chair.obj", models::chairContext);
|
||||||
loadModelToContext("./models/window.obj", models::windowContext);
|
loadModelToContext("./models/window.obj", models::windowContext);
|
||||||
loadModelToContext("./models/test.obj", models::testContext);
|
loadModelToContext("./models/windowsill.obj", models::windowsillContext);
|
||||||
|
loadModelToContext("./models/shelf.obj", models::shelfContext);
|
||||||
|
loadModelToContext("./models/lamp.obj", models::lampContext);
|
||||||
|
loadModelToContext("./models/painting.obj", models::paintingContext);
|
||||||
|
loadModelToContext("./models/door.obj", models::doorContext);
|
||||||
|
loadModelToContext("./models/doorframe.obj", models::doorframeContext);
|
||||||
|
loadModelToContext("./models/floorthing.obj", models::floorthingContext);
|
||||||
|
loadModelToContext("./models/books.obj", models::booksContext);
|
||||||
|
loadModelToContext("./models/cactus.obj", models::cactusContext);
|
||||||
|
loadModelToContext("./models/pstryczek.obj", models::pstryczekContext);
|
||||||
|
loadModelToContext("./models/laptop.obj", models::laptopContext);
|
||||||
|
|
||||||
|
texture::room = Core::LoadTexture("textures/room.png");
|
||||||
|
texture::oak = Core::LoadTexture("textures/dark_oak.jpg");
|
||||||
|
texture::bed = Core::LoadTexture("textures/dark_oak.jpg");
|
||||||
|
texture::books = Core::LoadTexture("textures/books.png");
|
||||||
|
texture::laptop = Core::LoadTexture("textures/laptop.png");
|
||||||
|
texture::cactus = Core::LoadTexture("textures/cactus.png");
|
||||||
|
texture::lamp = Core::LoadTexture("textures/lamp.png");
|
||||||
|
texture::painting = Core::LoadTexture("textures/painting.png");
|
||||||
|
texture::door = Core::LoadTexture("textures/door.png");
|
||||||
|
|
||||||
// inicjalizacja mapy głębokości
|
// inicjalizacja mapy głębokości
|
||||||
initDepthMap();
|
initDepthMap();
|
||||||
|
BIN
cw 9/textures/books.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
cw 9/textures/cactus.png
Normal file
After Width: | Height: | Size: 5.8 MiB |
BIN
cw 9/textures/dark_oak.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
cw 9/textures/door.png
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
cw 9/textures/lamp.png
Normal file
After Width: | Height: | Size: 855 KiB |
BIN
cw 9/textures/laptop.png
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
cw 9/textures/painting.png
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
cw 9/textures/room.png
Normal file
After Width: | Height: | Size: 3.7 MiB |