hot_new_model #16

Merged
s464965 merged 4 commits from hot_new_model into master 2023-02-13 09:51:17 +01:00
73 changed files with 7919 additions and 49 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,32 +2,22 @@
main.cpp main.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(130,1): warning C4005: "APIENTRY": ponowna definicja makra C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(130,1): warning C4005: "APIENTRY": ponowna definicja makra
C:\Users\annas\Desktop\grafika_proj\GRK_Room\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : zobacz poprzednią definicję „APIENTRY” C:\Users\annas\Desktop\grafika_proj\GRK_Room\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : zobacz poprzednią definicję „APIENTRY”
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(180,30): warning C4305: "inicjowanie": obcięcie z "double" do "float" C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(185,30): warning C4305: "inicjowanie": obcięcie z "double" do "float"
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(199,38): warning C4305: "=": obcięcie z "double" do "float" C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(204,38): warning C4305: "=": obcięcie z "double" do "float"
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(222,16): warning C4305: "inicjowanie": obcięcie z "double" do "float" C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(227,16): warning C4305: "inicjowanie": obcięcie z "double" do "float"
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(241,16): warning C4305: "inicjowanie": obcięcie z "double" do "float" C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(246,16): warning C4305: "inicjowanie": obcięcie z "double" do "float"
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(259,15): warning C4101: "textureID": lokalna zmienna, do której nie istnieje odwołanie C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(264,15): warning C4101: "textureID": lokalna zmienna, do której nie istnieje odwołanie
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(347,13): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(352,13): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(353,96): warning C4305: "argument": obcięcie z "double" do "T" C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(511,29): warning C4018: "<": niezgodność typu ze znakiem/bez znaku
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(536,13): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(550,109): warning C4305: "argument": obcięcie z "double" do "T"
with with
[ [
T=float T=float
] ]
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(356,59): warning C4305: "argument": obcięcie z "double" do "T" C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(803,21): warning C4305: "-=": obcięcie z "double" do "float"
with C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(805,21): warning C4305: "+=": obcięcie z "double" do "float"
[ C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(815,30): warning C4244: "=": konwersja z "double" do "float", możliwa utrata danych
T=float
]
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(505,29): warning C4018: "<": niezgodność typu ze znakiem/bez znaku
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(530,13): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(544,109): warning C4305: "argument": obcięcie z "double" do "T"
with
[
T=float
]
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(791,21): warning C4305: "-=": obcięcie z "double" do "float"
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(793,21): warning C4305: "+=": obcięcie z "double" do "float"
C:\Users\annas\Desktop\grafika_proj\GRK_Room\cw 9\src\room.hpp(803,30): warning C4244: "=": konwersja z "double" do "float", możliwa utrata danych
Box.obj : warning LNK4075: zignorowano opcję „/EDITANDCONTINUE” z powodu określenia opcji „/INCREMENTAL:NO” Box.obj : warning LNK4075: zignorowano opcję „/EDITANDCONTINUE” z powodu określenia opcji „/INCREMENTAL:NO”
LINK : warning LNK4098: domyślna biblioteka „MSVCRT” powoduje konflikt z innymi bibliotekami; użyj opcji /NODEFAULTLIB:biblioteka LINK : warning LNK4098: domyślna biblioteka „MSVCRT” powoduje konflikt z innymi bibliotekami; użyj opcji /NODEFAULTLIB:biblioteka
grk-cw9.vcxproj -> C:\Users\annas\Desktop\grafika_proj\GRK_Room\Debug\room.exe grk-cw9.vcxproj -> C:\Users\annas\Desktop\grafika_proj\GRK_Room\Debug\room.exe

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

12
cw 9/models/floor.mtl Normal file
View File

@ -0,0 +1,12 @@
# Blender 3.4.1 MTL File: 'None'
# www.blender.org
newmtl Material.001
Ns 224.999985
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/Genos/source/repos/GRK_RoomFINAL2/cw 9/textures/floor/floor.jpg

16
cw 9/models/floor.obj Normal file
View File

@ -0,0 +1,16 @@
# Blender 3.4.1
# www.blender.org
mtllib floor.mtl
o Plane
v -4.901168 -0.000000 2.500000
v 4.901168 -0.000000 2.500000
v 4.901168 0.000000 -2.500000
v -4.901168 0.000000 -2.500000
vn -0.0000 1.0000 -0.0000
vt -1.333263 -0.371995
vt 2.333263 -0.371995
vt 2.333263 1.371995
vt -1.333263 1.371995
s 1
usemtl Material.001
f 1/1/1 2/2/1 3/3/1 4/4/1

12
cw 9/models/plane2.mtl Normal file
View File

@ -0,0 +1,12 @@
# Blender 3.4.1 MTL File: 'None'
# www.blender.org
newmtl Material.001
Ns 224.999985
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/annas/Desktop/grafika_proj/GRK_Room/cw 9/textures/floor/floor4.jpg

16
cw 9/models/plane2.obj Normal file
View File

@ -0,0 +1,16 @@
# Blender 3.4.1
# www.blender.org
mtllib plane2.mtl
o Plane
v -4.901168 -0.000000 2.500000
v 4.901168 -0.000000 2.500000
v 4.901168 0.000000 -2.500000
v -4.901168 0.000000 -2.500000
vn -0.0000 1.0000 -0.0000
vt 1.289235 1.262694
vt -0.772454 1.281983
vt -0.779152 -0.262694
vt 1.282536 -0.281983
s 1
usemtl Material.001
f 1/1/1 2/2/1 3/3/1 4/4/1

490
cw 9/models/room/room.obj Normal file
View File

@ -0,0 +1,490 @@
# Blender v2.93.2 OBJ File: ''
# www.blender.org
mtllib room.mtl
o room_Cube.001
v -5.190374 1.970000 -2.300000
v -5.190374 2.500000 -2.299999
v -5.190374 2.500000 -2.500000
v -5.190374 1.970000 -2.500000
v 4.671336 1.970000 -2.500000
v 4.671336 2.500000 -2.500000
v 5.190374 2.500000 -2.500000
v 5.190374 1.970000 -2.500000
v 5.190374 1.970000 2.300000
v 5.190374 2.500000 2.300000
v 5.190374 2.500000 2.500000
v 5.190374 1.970000 2.500000
v -4.671336 1.970000 2.500000
v -4.671336 2.500000 2.500000
v -5.190374 2.500000 2.500000
v -5.190374 1.970000 2.500000
v 4.671336 -0.000000 2.300000
v 5.190374 -0.000000 2.300000
v 5.190374 -0.000000 2.500000
v 4.671336 -0.000000 2.500000
v -4.671336 2.500000 2.300000
v -5.190374 2.500000 2.300000
v 4.671336 2.500000 2.300000
v 4.671336 2.500000 2.500000
v 1.245690 -0.000000 2.300000
v 1.245690 -0.000000 2.500000
v 4.671336 1.970000 2.500000
v 1.245690 1.970000 -2.500000
v 1.245690 2.500000 -2.500000
v -4.671336 2.500000 -2.500000
v -4.671336 1.970000 -2.500000
v -5.190374 -0.000000 2.300000
v -4.671336 -0.000000 2.300000
v -4.671336 -0.000000 2.500000
v -5.190374 -0.000000 2.500000
v -1.245690 2.500000 2.300000
v -1.245690 2.500000 2.500000
v -1.245690 1.970000 2.500000
v -1.245690 2.500000 -2.500000
v -4.671336 2.500000 -2.299999
v -1.245690 2.500000 -2.299999
v -1.245690 2.500000 0.750000
v -4.671336 2.500000 0.750000
v -5.190374 0.000000 -2.500000
v -4.671336 0.000000 -2.500000
v -4.671336 0.000000 -2.300000
v -5.190374 0.000000 -2.300000
v -5.190374 -0.000000 0.750000
v -4.671336 -0.000000 0.750000
v 1.245690 0.000000 -2.500000
v 4.671336 0.000000 -2.500000
v 4.671336 0.000000 -2.300000
v 1.245690 0.000000 -2.300000
v -1.245690 1.970000 2.300000
v -4.671336 1.970000 2.300000
v -4.671336 2.299999 2.300000
v -1.245690 2.299999 2.300000
v 4.671336 2.500000 -2.299999
v 5.190374 2.500000 -2.299999
v 5.190374 2.500000 0.750000
v 4.671336 2.500000 0.750000
v -5.190374 2.500000 0.750000
v 5.190374 0.000000 -2.500000
v 5.190374 0.000000 -2.300000
v 4.671336 -0.000000 0.750000
v 5.190374 -0.000000 0.750000
v 5.190374 1.970000 -2.300000
v 5.190374 1.970000 0.750000
v -5.190374 1.970000 2.300000
v -5.190374 1.970000 -0.250000
v -5.190374 2.500000 -0.250000
v 1.245690 2.300000 0.750000
v 4.671336 2.300000 0.750000
v 4.671336 2.299999 2.300000
v 1.245690 2.299999 2.300000
v -4.671336 1.970000 -0.250000
v -4.671336 1.970000 -2.300000
v -4.671336 2.300000 -2.299999
v -4.671336 2.300000 -0.250000
v 4.671336 1.970000 0.750000
v 4.671336 1.970000 2.300000
v 1.245690 1.970000 -2.300000
v 4.671336 1.970000 -2.300000
v 4.671336 2.300000 -2.299999
v 1.245690 2.300000 -2.299999
v -1.245690 1.970000 -2.300000
v -1.245690 2.300000 -2.299999
v -4.671336 2.300000 0.750000
v -1.245690 2.300000 0.750000
v 1.245690 1.970000 2.300000
v -1.245690 0.000000 -2.500000
v -1.245690 0.000000 -2.300000
v 1.245690 2.500000 0.750000
v 1.245690 2.500000 2.300000
v 1.245690 2.500000 -2.299999
v 1.245690 1.970000 2.500000
v 1.245690 2.500000 2.500000
v -1.245690 1.970000 -2.500000
v -1.245690 -0.000000 2.300000
v -1.245690 -0.000000 2.500000
v 4.671336 1.015374 2.500000
v 1.245690 1.015374 2.500000
v -4.671336 1.015374 -2.500000
v -1.245690 1.015374 -2.500000
v -1.245690 1.015374 2.500000
v -5.190374 1.015374 -0.250000
v -5.190374 1.015374 -2.300000
v -5.190374 1.015374 2.500000
v -5.190374 1.015374 2.300000
v 5.190374 1.015374 0.750000
v 5.190374 1.015374 2.300000
v 5.190374 1.015374 -2.500000
v 5.190374 1.015374 -2.300000
v -4.671336 1.015374 2.500000
v -5.190374 1.015374 -2.500000
v 1.245690 1.015374 -2.500000
v 4.671336 1.015374 -2.500000
v 5.190374 1.015374 2.500000
v 1.245690 1.015374 -2.300000
v 4.671336 1.015374 2.300000
v 1.245690 1.015374 2.300000
v -1.245690 1.015374 2.300000
v -4.671336 1.015374 -2.300000
v -1.245690 1.015374 -2.300000
v 4.671336 1.015374 -2.300000
v 4.671336 1.015374 0.750000
v -4.671336 1.015374 -0.250000
v -4.671336 1.015374 2.300000
v -4.671336 1.015374 0.750000
v -4.671336 1.970000 0.750000
v 4.671336 1.015374 -0.250000
v 4.671336 1.970000 -0.250000
v 5.190374 1.015374 -0.250000
v 5.190374 1.970000 -0.250000
v -5.190374 1.970000 0.750000
v -5.190374 1.015374 0.750000
v -1.245690 2.300000 -0.250000
v 1.245690 2.300000 -0.250000
v 4.671336 2.500000 -0.250000
v 1.245690 2.500000 -0.250000
v -1.245690 2.500000 -0.250000
v 4.671336 2.300000 -0.250000
v 5.190374 2.500000 -0.250000
v 4.671336 0.000000 -0.250000
v 5.190374 0.000000 -0.250000
v -4.671336 2.500000 -0.250000
v -5.190374 0.000000 -0.250000
v -4.671336 0.000000 -0.250000
vt 0.571865 0.237945
vt 0.625000 0.237945
vt 0.625000 0.250000
vt 0.571865 0.250000
vt 0.571865 0.481764
vt 0.625000 0.481764
vt 0.625000 0.500000
vt 0.571865 0.500000
vt 0.571865 0.733848
vt 0.625000 0.733848
vt 0.625000 0.750000
vt 0.571865 0.750000
vt 0.571865 0.942864
vt 0.625000 0.942864
vt 0.625000 1.000000
vt 0.571865 1.000000
vt 0.356764 0.733848
vt 0.375000 0.733848
vt 0.375000 0.750000
vt 0.356764 0.750000
vt 0.817864 0.733848
vt 0.875000 0.733848
vt 0.875000 0.750000
vt 0.817864 0.750000
vt 0.643236 0.733848
vt 0.643236 0.750000
vt 0.303586 0.733848
vt 0.303586 0.750000
vt 0.625000 0.768236
vt 0.571865 0.768236
vt 0.571865 0.428586
vt 0.625000 0.428586
vt 0.625000 0.307136
vt 0.571865 0.307136
vt 0.125000 0.733848
vt 0.182136 0.733848
vt 0.182136 0.750000
vt 0.125000 0.750000
vt 0.752288 0.733848
vt 0.752288 0.750000
vt 0.571865 0.877288
vt 0.625000 0.877288
vt 0.752288 0.500000
vt 0.817864 0.500000
vt 0.817864 0.512055
vt 0.752288 0.512055
vt 0.752288 0.622952
vt 0.817864 0.622952
vt 0.125000 0.500000
vt 0.182136 0.500000
vt 0.182136 0.512055
vt 0.125000 0.512055
vt 0.125000 0.622952
vt 0.182136 0.622952
vt 0.303586 0.500000
vt 0.356764 0.500000
vt 0.356764 0.512055
vt 0.303586 0.512055
vt 0.247712 0.733848
vt 0.182136 0.733848
vt 0.182136 0.733848
vt 0.247712 0.733848
vt 0.643236 0.500000
vt 0.643236 0.512055
vt 0.625000 0.512055
vt 0.625000 0.622952
vt 0.643236 0.622952
vt 0.875000 0.500000
vt 0.875000 0.512055
vt 0.875000 0.622952
vt 0.375000 0.500000
vt 0.375000 0.512055
vt 0.356764 0.622952
vt 0.375000 0.622952
vt 0.571865 0.512055
vt 0.571865 0.622952
vt 0.571865 0.000000
vt 0.625000 0.000000
vt 0.625000 0.016152
vt 0.571865 0.016152
vt 0.571865 0.182497
vt 0.625000 0.182497
vt 0.303586 0.622952
vt 0.356764 0.622952
vt 0.356764 0.733848
vt 0.303586 0.733848
vt 0.182136 0.567503
vt 0.182136 0.512055
vt 0.182136 0.512055
vt 0.182136 0.567503
vt 0.356764 0.622952
vt 0.356764 0.733848
vt 0.303586 0.512055
vt 0.356764 0.512055
vt 0.356764 0.512055
vt 0.303586 0.512055
vt 0.247712 0.512055
vt 0.247712 0.512055
vt 0.182136 0.622952
vt 0.247712 0.622952
vt 0.303586 0.733848
vt 0.247712 0.500000
vt 0.247712 0.512055
vt 0.696414 0.622952
vt 0.696414 0.733848
vt 0.696414 0.500000
vt 0.696414 0.512055
vt 0.571865 0.821414
vt 0.625000 0.821414
vt 0.696414 0.750000
vt 0.625000 0.372712
vt 0.571865 0.372712
vt 0.247712 0.733848
vt 0.247712 0.750000
vt 0.476468 0.768236
vt 0.476468 0.821414
vt 0.476468 0.307136
vt 0.476468 0.372712
vt 0.476468 0.877288
vt 0.476468 0.182497
vt 0.476468 0.237945
vt 0.476468 0.000000
vt 0.476468 0.016152
vt 0.476468 0.622952
vt 0.476468 0.733848
vt 0.476468 0.500000
vt 0.476468 0.512055
vt 0.476468 0.942864
vt 0.476468 0.250000
vt 0.476468 0.428586
vt 0.476468 0.481764
vt 0.476468 0.750000
vt 0.476468 1.000000
vt 0.303586 0.512055
vt 0.441862 0.463192
vt 0.356764 0.733848
vt 0.303586 0.733848
vt 0.247712 0.733848
vt 0.182136 0.512055
vt 0.247712 0.512055
vt 0.356764 0.512055
vt 0.356764 0.622952
vt 0.182136 0.567503
vt 0.182136 0.733848
vt 0.414786 0.434393
vt 0.182136 0.622952
vt 0.182136 0.622952
vt 0.356764 0.567503
vt 0.356764 0.567503
vt 0.476468 0.567503
vt 0.571865 0.567503
vt 0.571865 0.127048
vt 0.476468 0.127048
vt 0.247712 0.567503
vt 0.303586 0.567503
vt 0.643236 0.567503
vt 0.696414 0.567503
vt 0.752288 0.567503
vt 0.356764 0.567503
vt 0.625000 0.127048
vt 0.625000 0.567503
vt 0.356764 0.567503
vt 0.375000 0.567503
vt 0.817864 0.567503
vt 0.875000 0.567503
vt 0.125000 0.567503
vt 0.182136 0.567503
vt 0.375000 0.127048
vt 0.375000 0.182497
vt 0.375000 0.016152
vt 0.375000 0.237945
vt 0.375000 0.250000
vt 0.375000 0.481764
vt 0.375000 0.942864
vt 0.375000 1.000000
vt 0.375000 0.768236
vt 0.375000 0.428586
vt 0.375000 0.307136
vt 0.375000 0.877288
vt 0.375000 0.000000
vt 0.375000 0.821414
vt 0.375000 0.372712
vn -1.0000 -0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 1.0000 0.0000
usemtl None
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 5/5/2 6/6/2 7/7/2 8/8/2
f 9/9/3 10/10/3 11/11/3 12/12/3
f 13/13/4 14/14/4 15/15/4 16/16/4
f 17/17/5 18/18/5 19/19/5 20/20/5
f 21/21/6 22/22/6 15/23/6 14/24/6
f 10/10/6 23/25/6 24/26/6 11/11/6
f 25/27/5 17/17/5 20/20/5 26/28/5
f 12/12/4 11/11/4 24/29/4 27/30/4
f 28/31/2 29/32/2 6/6/2 5/5/2
f 4/4/2 3/3/2 30/33/2 31/34/2
f 32/35/5 33/36/5 34/37/5 35/38/5
f 36/39/6 21/21/6 14/24/6 37/40/6
f 38/41/4 37/42/4 14/14/4 13/13/4
f 39/43/6 30/44/6 40/45/6 41/46/6
f 42/47/6 43/48/6 21/21/6 36/39/6
f 44/49/5 45/50/5 46/51/5 47/52/5
f 48/53/5 49/54/5 33/36/5 32/35/5
f 50/55/5 51/56/5 52/57/5 53/58/5
f 54/59/2 55/60/2 56/61/2 57/62/2
f 7/7/6 6/63/6 58/64/6 59/65/6
f 60/66/6 61/67/6 23/25/6 10/10/6
f 30/44/6 3/68/6 2/69/6 40/45/6
f 43/48/6 62/70/6 22/22/6 21/21/6
f 51/56/5 63/71/5 64/72/5 52/57/5
f 65/73/5 66/74/5 18/18/5 17/17/5
f 8/8/3 7/7/3 59/65/3 67/75/3
f 68/76/3 60/66/3 10/10/3 9/9/3
f 16/77/1 15/78/1 22/79/1 69/80/1
f 70/81/1 71/82/1 2/2/1 1/1/1
f 72/83/5 73/84/5 74/85/5 75/86/5
f 76/87/3 77/88/3 78/89/3 79/90/3
f 80/91/1 81/92/1 74/85/1 73/84/1
f 82/93/4 83/94/4 84/95/4 85/96/4
f 77/88/4 86/97/4 87/98/4 78/89/4
f 88/99/5 89/100/5 57/62/5 56/61/5
f 90/101/2 54/59/2 57/62/2 75/86/2
f 45/50/5 91/102/5 92/103/5 46/51/5
f 93/104/6 42/47/6 36/39/6 94/105/6
f 29/106/6 39/43/6 41/46/6 95/107/6
f 96/108/4 97/109/4 37/42/4 38/41/4
f 94/105/6 36/39/6 37/40/6 97/110/6
f 31/34/2 30/33/2 39/111/2 98/112/2
f 33/36/5 99/113/5 100/114/5 34/37/5
f 23/25/6 94/105/6 97/110/6 24/26/6
f 27/30/4 24/29/4 97/109/4 96/108/4
f 6/63/6 29/106/6 95/107/6 58/64/6
f 61/67/6 93/104/6 94/105/6 23/25/6
f 81/92/2 90/101/2 75/86/2 74/85/2
f 86/97/4 82/93/4 85/96/4 87/98/4
f 89/100/5 72/83/5 75/86/5 57/62/5
f 98/112/2 39/111/2 29/32/2 28/31/2
f 99/113/5 25/27/5 26/28/5 100/114/5
f 86/97/5 98/112/5 28/31/5 82/93/5
f 101/115/4 27/30/4 96/108/4 102/116/4
f 103/117/2 31/34/2 98/112/2 104/118/2
f 102/116/4 96/108/4 38/41/4 105/119/4
f 106/120/1 70/81/1 1/1/1 107/121/1
f 108/122/1 16/77/1 69/80/1 109/123/1
f 110/124/3 68/76/3 9/9/3 111/125/3
f 112/126/3 8/8/3 67/75/3 113/127/3
f 105/119/4 38/41/4 13/13/4 114/128/4
f 115/129/2 4/4/2 31/34/2 103/117/2
f 116/130/2 28/31/2 5/5/2 117/131/2
f 118/132/4 12/12/4 27/30/4 101/115/4
f 114/128/4 13/13/4 16/16/4 108/133/4
f 111/125/3 9/9/3 12/12/3 118/132/3
f 117/131/2 5/5/2 8/8/2 112/126/2
f 107/121/1 1/1/1 4/4/1 115/129/1
f 119/134/1 116/135/1 50/55/1 53/58/1
f 120/136/2 121/137/2 90/101/2 81/92/2
f 121/137/2 122/138/2 54/59/2 90/101/2
f 123/139/4 124/140/4 86/97/4 77/88/4
f 119/134/4 125/141/4 83/94/4 82/93/4
f 126/142/1 120/136/1 81/92/1 80/91/1
f 127/143/3 123/139/3 77/88/3 76/87/3
f 122/138/2 128/144/2 55/60/2 54/59/2
f 124/140/3 92/103/3 91/102/3 104/145/3
f 128/144/3 129/146/3 130/147/3 55/60/3
f 131/148/1 126/142/1 80/91/1 132/149/1
f 133/150/3 134/151/3 68/76/3 110/124/3
f 109/123/1 69/80/1 135/152/1 136/153/1
f 137/154/5 138/155/5 72/83/5 89/100/5
f 139/156/6 140/157/6 93/104/6 61/67/6
f 140/157/6 141/158/6 42/47/6 93/104/6
f 79/90/5 137/154/5 89/100/5 88/99/5
f 132/149/1 80/91/1 73/84/1 142/159/1
f 55/60/3 130/147/3 88/99/3 56/61/3
f 138/155/5 142/159/5 73/84/5 72/83/5
f 69/80/1 22/79/1 62/160/1 135/152/1
f 134/151/3 143/161/3 60/66/3 68/76/3
f 144/162/5 145/163/5 66/74/5 65/73/5
f 146/164/6 71/165/6 62/70/6 43/48/6
f 143/161/6 139/156/6 61/67/6 60/66/6
f 147/166/5 148/167/5 49/54/5 48/53/5
f 141/158/6 146/164/6 43/48/6 42/47/6
f 41/46/6 40/45/6 146/164/6 141/158/6
f 47/52/5 46/51/5 148/167/5 147/166/5
f 59/65/6 58/64/6 139/156/6 143/161/6
f 40/45/6 2/69/6 71/165/6 146/164/6
f 52/57/5 64/72/5 145/163/5 144/162/5
f 67/75/3 59/65/3 143/161/3 134/151/3
f 85/96/5 84/95/5 142/159/5 138/155/5
f 83/94/1 132/149/1 142/159/1 84/95/1
f 78/89/5 87/98/5 137/154/5 79/90/5
f 95/107/6 41/46/6 141/158/6 140/157/6
f 58/64/6 95/107/6 140/157/6 139/156/6
f 87/98/5 85/96/5 138/155/5 137/154/5
f 113/127/3 67/75/3 134/151/3 133/150/3
f 125/141/1 131/148/1 132/149/1 83/94/1
f 130/147/3 76/87/3 79/90/3 88/99/3
f 135/152/1 62/160/1 71/82/1 70/81/1
f 48/168/1 136/153/1 106/120/1 147/169/1
f 49/54/3 148/167/3 127/143/3 129/146/3
f 52/57/1 144/162/1 131/148/1 125/141/1
f 64/72/3 113/127/3 133/150/3 145/163/3
f 32/170/1 109/123/1 136/153/1 48/168/1
f 145/163/3 133/150/3 110/124/3 66/74/3
f 144/162/1 65/73/1 126/142/1 131/148/1
f 33/36/3 49/54/3 129/146/3 128/144/3
f 86/97/3 124/140/3 104/145/3 98/112/3
f 99/113/2 33/36/2 128/144/2 122/138/2
f 148/167/3 46/51/3 123/139/3 127/143/3
f 65/73/1 17/17/1 120/136/1 126/142/1
f 53/58/4 52/57/4 125/141/4 119/134/4
f 46/51/4 92/103/4 124/140/4 123/139/4
f 25/27/2 99/113/2 122/138/2 121/137/2
f 17/17/2 25/27/2 121/137/2 120/136/2
f 82/93/1 28/31/1 116/135/1 119/134/1
f 47/171/1 107/121/1 115/129/1 44/172/1
f 51/173/2 117/131/2 112/126/2 63/71/2
f 18/18/3 111/125/3 118/132/3 19/19/3
f 34/174/4 114/128/4 108/133/4 35/175/4
f 19/19/4 118/132/4 101/115/4 20/176/4
f 50/177/2 116/130/2 117/131/2 51/173/2
f 44/172/2 115/129/2 103/117/2 45/178/2
f 100/179/4 105/119/4 114/128/4 34/174/4
f 63/71/3 112/126/3 113/127/3 64/72/3
f 66/74/3 110/124/3 111/125/3 18/18/3
f 35/180/1 108/122/1 109/123/1 32/170/1
f 147/169/1 106/120/1 107/121/1 47/171/1
f 26/181/4 102/116/4 105/119/4 100/179/4
f 45/178/2 103/117/2 104/118/2 91/182/2
f 20/176/4 101/115/4 102/116/4 26/181/4
f 136/153/6 129/146/6 127/143/6 106/120/6
f 127/143/4 76/87/4 70/81/4 106/120/4
f 76/87/5 130/147/5 135/152/5 70/81/5
f 129/146/2 136/153/2 135/152/2 130/147/2

View File

@ -0,0 +1,16 @@
# Blender MTL File: 'side_table_01_4k.blend'
# Material Count: 1
newmtl side_table_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_side_table_01_4k.blend.zip\\textures\\side_table_01_nor_gl_4k.exr
map_Kd C:\\Users\\korze\\AppData\\Local\\Temp\\Temp1_side_table_01_4k.blend.zip\\textures\\side_table_01_diff_4k.jpg
map_Ns C:\\Users\\korze\\AppData\\Local\\Temp\\Temp1_side_table_01_4k.blend.zip\\textures\\side_table_01_rough_4k.jpg
refl C:\\Users\\korze\\AppData\\Local\\Temp\\Temp1_side_table_01_4k.blend.zip\\textures\\side_table_01_metal_4k.exr

6990
cw 9/models/side_table.obj Normal file

File diff suppressed because it is too large Load Diff

28
cw 9/shaders/.vert Normal file
View File

@ -0,0 +1,28 @@
#version 430 core
layout (location = 0) out vec3 vertexPosition;
layout (location = 1) out vec3 vertexNormal;
layout (location = 2) in vec2 vertexTexCoords;
out vec3 FragPos;
out vec2 TexCoords;
out vec3 Normal;
uniform bool invertedNormals;
uniform mat4 modelMatrix;
uniform mat3 transformation;
uniform mat4 view;
uniform mat4 projection;
void main()
{
vec4 viewPos = transformation * vec4(vertexPosition, 1.0);
FragPos = viewPos.xyz;
TexCoord = vertexTexCoords;
mat3 normalMatrix = transpose(inverse(mat3( * model)));
Normal = normalMatrix * (invertedNormals ? -aNormal : aNormal);
gl_Position = viewPos;
}

View File

@ -135,6 +135,7 @@ void main()
//vec3 viewDir = normalize(cameraPos-worldPos); //vec3 viewDir = normalize(cameraPos-worldPos);
vec3 lightDir = normalize(lightDirTS); vec3 lightDir = normalize(lightDirTS);
vec3 sunDir2 = normalize(sunDirTS);
//vec3 lightDir = normalize(lightPos-worldPos); //vec3 lightDir = normalize(lightPos-worldPos);
metallic = texture2D(armSampler, vecTex).z; metallic = texture2D(armSampler, vecTex).z;
@ -158,7 +159,7 @@ void main()
//sun //sun
ilumination=ilumination+PBRLight(sunDir,sunColor*calculateShadow(normal, spotlightDir, sunSpacePos, depthMap),normal,viewDir); ilumination=ilumination+PBRLight(sunDir2,sunColor*calculateShadow(normal, spotlightDir, sunSpacePos, depthMap),normal,viewDir);

View File

@ -0,0 +1,171 @@
#version 430 core
layout (location = 0) out vec4 FragColor;
layout (location = 1) out vec4 BloomColor;
float AMBIENT = 0.03;
float PI = 3.14;
uniform sampler2D depthMap;
uniform sampler2D depthMapShip;
uniform sampler2D colorTexture;
uniform sampler2D normalSampler;
uniform vec3 cameraPos;
uniform vec3 color;
uniform vec3 sunDir;
uniform vec3 sunColor;
uniform vec3 lightPos;
uniform vec3 lightColor;
uniform vec3 spotlightPos;
uniform vec3 spotlightColor;
uniform vec3 spotlightConeDir;
uniform vec3 spotlightPhi;
uniform float metallic;
uniform float roughness;
uniform float exposition;
in vec3 vecNormal;
in vec3 worldPos;
out vec4 outColor;
in vec3 viewDirTS;
in vec3 lightDirTS;
in vec3 spotlightDirTS;
in vec3 sunDirTS;
in vec3 test;
in vec4 sunSpacePos;
in vec4 shipPos;
in vec2 vecTex;
float calculateShadow(vec3 normal, vec3 light, vec4 pos, sampler2D depth) {
vec4 posNormalized = (pos / pos.w) * 0.5 + 0.5;
float closestDepth = texture2D(depth, posNormalized.xy).r;
//float bias = max(0.03 * (1.0 - dot(normal, light)), 0.003);
if (closestDepth + 0.003 > posNormalized.z) return 1.0;
return 0.0;
}
float DistributionGGX(vec3 normal, vec3 H, float roughness){
float a = roughness*roughness;
float a2 = a*a;
float NdotH = max(dot(normal, H), 0.0);
float NdotH2 = NdotH*NdotH;
float num = a2;
float denom = (NdotH2 * (a2 - 1.0) + 1.0);
denom = PI * denom * denom;
return num / denom;
}
float GeometrySchlickGGX(float NdotV, float roughness){
float r = (roughness + 1.0);
float k = (r*r) / 8.0;
float num = NdotV;
float denom = NdotV * (1.0 - k) + k;
return num / denom;
}
float GeometrySmith(vec3 normal, vec3 V, vec3 lightDir, float roughness){
float NdotV = max(dot(normal, V), 0.0);
float NdotL = max(dot(normal, lightDir), 0.0);
float ggx2 = GeometrySchlickGGX(NdotV, roughness);
float ggx1 = GeometrySchlickGGX(NdotL, roughness);
return ggx1 * ggx2;
}
vec3 fresnelSchlick(float cosTheta, vec3 F0){
return F0 + (1.0 - F0) * pow(clamp(1.0 - cosTheta, 0.0, 1.0), 5.0);
}
vec3 PBRLight(vec3 lightDir, vec3 radiance, vec3 normal, vec3 V){
float diffuse=max(0,dot(normal,lightDir));
//vec3 V = normalize(cameraPos-worldPos);
vec3 F0 = vec3(0.04);
F0 = mix(F0, color, metallic);
vec3 H = normalize(V + lightDir);
// cook-torrance brdf
float NDF = DistributionGGX(normal, H, roughness);
float G = GeometrySmith(normal, V, lightDir, roughness);
vec3 F = fresnelSchlick(max(dot(H, V), 0.0), F0);
vec3 kS = F;
vec3 kD = vec3(1.0) - kS;
kD *= 1.0 - metallic;
vec3 numerator = NDF * G * F;
float denominator = 4.0 * max(dot(normal, V), 0.0) * max(dot(normal, lightDir), 0.0) + 0.0001;
vec3 specular = numerator / denominator;
// add to outgoing radiance Lo
float NdotL = max(dot(normal, lightDir), 0.0);
return (kD * color / PI + specular) * radiance * NdotL;
}
void main()
{
//vec3 normal = vec3(0,0,1);
vec3 normal = normalize(vecNormal);
//color = texture2D(colorTexture, vecTex).xyz;
//vec3 normal = normalize((texture2D(normalSampler, vecTex).xyz) * 2 - 1);
//vec3 viewDir = normalize(viewDirTS);
vec3 viewDir = normalize(cameraPos-worldPos);
//vec3 lightDir = normalize(lightDirTS);
vec3 lightDir = normalize(lightPos-worldPos);
vec3 ambient = AMBIENT*color;
vec3 attenuatedlightColor = lightColor/pow(length(lightPos-worldPos),2);
vec3 ilumination;
ilumination = ambient+PBRLight(lightDir,attenuatedlightColor,normal,viewDir);
//flashlight
//vec3 spotlightDir= normalize(spotlightDirTS);
vec3 spotlightDir= normalize(spotlightPos-worldPos);
float angle_atenuation = clamp((dot(-normalize(spotlightPos-worldPos),spotlightConeDir)-0.5)*3,0,1);
attenuatedlightColor = angle_atenuation*spotlightColor/pow(length(spotlightPos-worldPos),2)*calculateShadow(normal, spotlightDir, shipPos, depthMapShip);
ilumination=ilumination+PBRLight(spotlightDir,attenuatedlightColor,normal,viewDir);
//sun
ilumination=ilumination+PBRLight(sunDir,sunColor*calculateShadow(normal, spotlightDir, sunSpacePos, depthMap),normal,viewDir);
outColor = vec4(vec3(1.01) - exp(-ilumination*exposition),1);
FragColor = outColor;
// check whether fragment output is higher than threshold, if so output as brightness color
float brightness = dot(FragColor.rgb, vec3(0.2126, 0.7152, 0.0722));
if(brightness > 1.0)
BloomColor = vec4(FragColor.rgb, 1.0);
else
BloomColor = vec4(0.0, 0.0, 0.0, 1.0);
//outColor = vec4(roughness,metallic,0,1);
//outColor = vec4(test;
}

View File

@ -0,0 +1,53 @@
#version 430 core
layout(location = 0) in vec3 vertexPosition;
layout(location = 1) in vec3 vertexNormal;
layout(location = 2) in vec2 vertexTexCoord;
layout(location = 3) in vec3 vertexTangent;
layout(location = 4) in vec3 vertexBitangent;
uniform mat4 lightVP;
uniform mat4 lightShipVP;
uniform mat4 transformation;
uniform mat4 modelMatrix;
out vec3 vecNormal;
out vec3 worldPos;
uniform vec3 lightPos;
uniform vec3 spotlightPos;
uniform vec3 cameraPos;
uniform vec3 sunDir;
out vec3 viewDirTS;
out vec3 lightDirTS;
out vec3 spotlightDirTS;
out vec3 sunDirTS;
out vec4 sunSpacePos;
out vec4 shipPos;
out vec2 vecTex;
void main()
{
sunSpacePos = lightVP * modelMatrix * vec4(vertexPosition, 1);
shipPos = lightShipVP * modelMatrix * vec4(vertexPosition, 1);
worldPos = (modelMatrix* vec4(vertexPosition,1)).xyz;
vecNormal = (modelMatrix* vec4(vertexNormal,0)).xyz;
gl_Position = transformation * vec4(vertexPosition, 1.0);
vec3 w_tangent = normalize(mat3(modelMatrix)*vertexTangent);
vec3 w_bitangent = normalize(mat3(modelMatrix)*vertexBitangent);
mat3 TBN = transpose(mat3(w_tangent, w_bitangent, vecNormal));
vecTex = vertexTexCoord;
vec3 V = normalize(cameraPos-worldPos);
viewDirTS = TBN*V;
vec3 L = normalize(lightPos-worldPos);
lightDirTS = TBN*L;
vec3 SL = normalize(spotlightPos-worldPos);
spotlightDirTS = TBN*SL;
sunDirTS = TBN*sunDir;
}

View File

@ -50,6 +50,7 @@ namespace models {
Core::RenderContext easelContext; Core::RenderContext easelContext;
Core::RenderContext carContext; Core::RenderContext carContext;
Core::RenderContext vaseContext; Core::RenderContext vaseContext;
Core::RenderContext sideTableContext;
} }
namespace texture { namespace texture {
@ -118,6 +119,14 @@ namespace texture {
GLuint redLeather; GLuint redLeather;
GLuint redLeatherNormal; GLuint redLeatherNormal;
GLuint redLeatherARM; GLuint redLeatherARM;
GLuint metal;
GLuint metalNormal;
GLuint metalARM;
GLuint rust;
GLuint rustNormal;
GLuint rustARM;
} }
Core::RenderContext cubeContext; Core::RenderContext cubeContext;
@ -142,6 +151,7 @@ GLuint bloomTextureFBO;
GLuint program; GLuint program;
GLuint programSun; GLuint programSun;
GLuint programTest; GLuint programTest;
GLuint programNoTex;
GLuint programTex; GLuint programTex;
GLuint programDepth; GLuint programDepth;
GLuint programSkybox; GLuint programSkybox;
@ -179,7 +189,7 @@ glm::vec3 spotlightConeDir = glm::vec3(0, 0, 0);
glm::vec3 spotlightColor = glm::vec3(1.0, 1.0, 1.0)*10; glm::vec3 spotlightColor = glm::vec3(1.0, 1.0, 1.0)*10;
float spotlightPhi = 3.14 / 4; float spotlightPhi = 3.14 / 4;
glm::mat4 lightVP = glm::ortho(-4.f, 3.f, -2.5f, 5.f, -10.0f, 20.0f) * glm::lookAt(sunPos, sunPos - sunDir, glm::vec3(0, 1, 0)); // glm::mat4 lightVP = glm::ortho(-3.f, 3.f, -3.f, 4.f, -10.0f, 20.0f) * glm::lookAt(sunPos, sunPos - sunDir, glm::vec3(0, 1, 0));
glm::mat4 lightShipVP; glm::mat4 lightShipVP;
float lastTime = -1.f; float lastTime = -1.f;
@ -343,6 +353,53 @@ void drawObjectPBR(Core::RenderContext& context, glm::mat4 modelMatrix, GLuint t
Core::DrawContext(context); Core::DrawContext(context);
} }
void drawObjectNoPBR(Core::RenderContext& context, glm::mat4 modelMatrix, glm::vec3 color, float roughness, float metallic) {
glUseProgram(programNoTex);
glActiveTexture(GL_TEXTURE0);
glUniform1i(glGetUniformLocation(programNoTex, "depthMap"), 0);
glBindTexture(GL_TEXTURE_2D, depthMap);
glUniformMatrix4fv(glGetUniformLocation(programNoTex, "lightVP"), 1, GL_FALSE, (float*)&lightVP);
glActiveTexture(GL_TEXTURE1);
glUniform1i(glGetUniformLocation(programNoTex, "depthMapShip"), 1);
glBindTexture(GL_TEXTURE_2D, depthMapShip);
glUniformMatrix4fv(glGetUniformLocation(programNoTex, "lightShipVP"), 1, GL_FALSE, (float*)&lightShipVP);
glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix();
glm::mat4 transformation = viewProjectionMatrix * modelMatrix;
glUniformMatrix4fv(glGetUniformLocation(programNoTex, "transformation"), 1, GL_FALSE, (float*)&transformation);
glUniformMatrix4fv(glGetUniformLocation(programNoTex, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix);
glUniform1f(glGetUniformLocation(programNoTex, "exposition"), exposition);
glUniform1f(glGetUniformLocation(programNoTex, "roughness"), roughness);
glUniform1f(glGetUniformLocation(programNoTex, "metallic"), metallic);
glUniform3f(glGetUniformLocation(programNoTex, "color"), color.x, color.y, color.z);
glUniform3f(glGetUniformLocation(programNoTex, "cameraPos"), cameraPos.x, cameraPos.y, cameraPos.z);
glUniform3f(glGetUniformLocation(programNoTex, "sunDir"), sunDir.x, sunDir.y, sunDir.z);
glUniform3f(glGetUniformLocation(programNoTex, "sunColor"), sunColor.x, sunColor.y, sunColor.z);
if (lightOn)
glUniform3f(glGetUniformLocation(programNoTex, "lightPos"), pointlightPos.x, pointlightPos.y, pointlightPos.z);
else
glUniform3f(glGetUniformLocation(programNoTex, "lightPos"), 1000.f, 1000.f, 1000.f);
glUniform3f(glGetUniformLocation(programNoTex, "lightColor"), pointlightColor.x, pointlightColor.y, pointlightColor.z);
glUniform3f(glGetUniformLocation(programNoTex, "spotlightConeDir"), spotlightConeDir.x, spotlightConeDir.y, spotlightConeDir.z);
glUniform3f(glGetUniformLocation(programNoTex, "spotlightPos"), spotlightPos.x, spotlightPos.y, spotlightPos.z);
glUniform3f(glGetUniformLocation(programNoTex, "spotlightColor"), spotlightColor.x, spotlightColor.y, spotlightColor.z);
glUniform1f(glGetUniformLocation(programNoTex, "spotlightPhi"), spotlightPhi);
Core::DrawContext(context);
glUseProgram(program);
}
void renderShadowapSun(GLuint depthFBO, glm::mat4 light) { void renderShadowapSun(GLuint depthFBO, glm::mat4 light) {
float time = glfwGetTime(); float time = glfwGetTime();
glViewport(0, 0, SHADOW_WIDTH, SHADOW_HEIGHT); glViewport(0, 0, SHADOW_WIDTH, SHADOW_HEIGHT);
@ -350,13 +407,14 @@ void renderShadowapSun(GLuint depthFBO, glm::mat4 light) {
glClear(GL_DEPTH_BUFFER_BIT); glClear(GL_DEPTH_BUFFER_BIT);
glUseProgram(programDepth); glUseProgram(programDepth);
drawObjectDepth(sphereContext, light, glm::translate(pointlightPos) * glm::scale(glm::vec3(0.1)) * glm::eulerAngleY(time / 3) * glm::translate(glm::vec3(4.f, 0, 0)) * glm::scale(glm::vec3(0.3f))); //drawObjectDepth(sphereContext, light, glm::translate(pointlightPos) * glm::scale(glm::vec3(0.1)) * glm::eulerAngleY(time / 3) * glm::translate(glm::vec3(4.f, 0, 0)) * glm::scale(glm::vec3(0.3f)));
drawObjectDepth(sphereContext, //drawObjectDepth(sphereContext,
light, // 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))); // 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::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::couchContext, light, glm::eulerAngleY(3.14f));
drawObjectDepth(models::couchContext, light, glm::translate(glm::vec3(2.9f, 0.0f, 1.9f)) * glm::eulerAngleY(3.14f));
drawObjectDepth(models::coffeeTableContext, light, glm::translate(glm::vec3(2.8f, 0, 0.5f))); drawObjectDepth(models::coffeeTableContext, light, glm::translate(glm::vec3(2.8f, 0, 0.5f)));
drawObjectDepth(models::doorContext, light, glm::mat4()); drawObjectDepth(models::doorContext, light, glm::mat4());
drawObjectDepth(models::planeContext, light, glm::mat4()); drawObjectDepth(models::planeContext, light, glm::mat4());
@ -373,12 +431,13 @@ void renderShadowapSun(GLuint depthFBO, glm::mat4 light) {
drawObjectDepth(models::tvStandContext, light, glm::mat4()); drawObjectDepth(models::tvStandContext, light, glm::mat4());
drawObjectDepth(models::carpetContext, light, glm::mat4()); drawObjectDepth(models::carpetContext, light, glm::mat4());
drawObjectDepth(models::cabinet1Context, light, glm::mat4()); drawObjectDepth(models::cabinet1Context, light, glm::mat4());
drawObjectDepth(models::cabinet2Context, light, glm::mat4()); //drawObjectDepth(models::cabinet2Context, light, glm::mat4());
drawObjectDepth(models::lampContext, light, glm::mat4()); drawObjectDepth(models::lampContext, light, glm::mat4());
drawObjectDepth(models::bookshelfContext, light, glm::mat4()); drawObjectDepth(models::bookshelfContext, light, glm::mat4());
drawObjectDepth(models::easelContext, light, glm::mat4()); drawObjectDepth(models::easelContext, light, glm::mat4());
drawObjectDepth(models::carContext, light, glm::translate(carPosTranform)); drawObjectDepth(models::carContext, light, glm::translate(carPosTranform));
drawObjectDepth(models::vaseContext, light, glm::translate(glm::vec3(1.1f, 1.41f, -2.2f))); drawObjectDepth(models::vaseContext, light, glm::translate(glm::vec3(1.1f, 1.41f, -2.2f)));
drawObjectDepth(models::sideTableContext, light, glm::translate(glm::vec3(0.0f, 0.0f, 1.9f)));
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));
@ -564,14 +623,18 @@ void renderScene(GLFWwindow* window)
drawObjectPBR(models::tvStandContext, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM); drawObjectPBR(models::tvStandContext, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM);
drawObjectPBR(models::carpetContext, glm::mat4(), texture::carpet, texture::carpetNormal, texture::carpetARM); drawObjectPBR(models::carpetContext, glm::mat4(), texture::carpet, texture::carpetNormal, texture::carpetARM);
drawObjectPBR(models::cabinet1Context, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM); drawObjectPBR(models::cabinet1Context, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM);
drawObjectPBR(models::cabinet2Context, 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::lampContext, glm::translate(glm::vec3(0.022f, 0.15f, 0.04f)), texture::metal, texture::metalNormal, texture::metalARM);
drawObjectPBR(models::bookshelfContext, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM); drawObjectPBR(models::bookshelfContext, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM);
drawObjectPBR(models::lightSwitchContext, glm::mat4(), texture::white, texture::whiteNormal, texture::whiteARM); drawObjectPBR(models::lightSwitchContext, glm::mat4(), texture::door, texture::doorNorm, texture::doorArm);
drawObjectPBR(models::easelContext, glm::mat4(), texture::wood, texture::woodNormal, texture::woodARM); 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::carContext, glm::translate(carPosTranform), texture::brick, texture::brickNormal, texture::brickARM);
drawObjectNoPBR(models::carContext, glm::translate(carPosTranform), glm::vec3(1.0f, 0.0f, 0.0f), 0.0f, 0.2f);
drawObjectPBR(models::vaseContext, glm::translate(glm::vec3(1.1f, 1.41f, -2.2f)), texture::vase, texture::vaseNormal, texture::vaseARM); 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); //drawObjectPBR(models::couchContext, glm::eulerAngleY(3.14f), texture::redLeather, texture::redLeatherNormal, texture::redLeatherARM);
drawObjectPBR(models::couchContext, glm::translate(glm::vec3(2.9f, 0.0f, 1.9f)) * glm::eulerAngleY(3.14f), texture::redLeather, texture::redLeatherNormal, texture::redLeatherARM);
drawObjectPBR(models::sideTableContext, glm::translate(glm::vec3(0.0f, 0.0f, 1.9f)), texture::wood, texture::woodNormal, texture::woodARM);
// draw windows // 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); 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);
@ -647,6 +710,10 @@ void init(GLFWwindow* window)
programSkybox = shaderLoader.CreateProgram("shaders/shader_skybox.vert", "shaders/shader_skybox.frag"); programSkybox = shaderLoader.CreateProgram("shaders/shader_skybox.vert", "shaders/shader_skybox.frag");
programBlur = shaderLoader.CreateProgram("shaders/shader_blur.vert", "shaders/shader_blur.frag"); programBlur = shaderLoader.CreateProgram("shaders/shader_blur.vert", "shaders/shader_blur.frag");
programNoTex = shaderLoader.CreateProgram("shaders/shader_no_pbr.vert", "shaders/shader_no_pbr.frag");
loadCubemap(faces); loadCubemap(faces);
initDepthMap(); initDepthMap();
@ -663,18 +730,14 @@ void init(GLFWwindow* window)
texture::spaceshipNormal = Core::LoadTexture("textures/spaceship/spaceship_normal.png"); texture::spaceshipNormal = Core::LoadTexture("textures/spaceship/spaceship_normal.png");
texture::spaceshipARM = Core::LoadTexture("textures/spaceship/spaceship_amr.png"); texture::spaceshipARM = Core::LoadTexture("textures/spaceship/spaceship_amr.png");
texture::floor = Core::LoadTexture("textures/floor/floor.jpg"); texture::floor = Core::LoadTexture("textures/floor/floor4.jpg");
texture::floorNormal = Core::LoadTexture("textures/floor/floor_normal.png"); texture::floorNormal = Core::LoadTexture("textures/floor/floor4_normal.jpg");
texture::floorARM = Core::LoadTexture("textures/floor/floor_arm.png"); texture::floorARM = Core::LoadTexture("textures/floor/floor4_arm.jpg");
texture::roof = Core::LoadTexture("textures/roof/roof.png"); texture::roof = Core::LoadTexture("textures/roof/roof.png");
texture::roofNormal = Core::LoadTexture("textures/roof/roof_normal.png"); texture::roofNormal = Core::LoadTexture("textures/roof/roof_normal.png");
texture::roofARM = Core::LoadTexture("textures/roof/roof_arm.png"); texture::roofARM = Core::LoadTexture("textures/roof/roof_arm.png");
texture::wood = Core::LoadTexture("textures/wood/wood.jpg");
texture::woodNormal = Core::LoadTexture("textures/wood/wood_normal.png");
texture::woodARM = Core::LoadTexture("textures/wood/wood_arm.png");
texture::wood2 = Core::LoadTexture("textures/wood_2/wood.jpg"); texture::wood2 = Core::LoadTexture("textures/wood_2/wood.jpg");
texture::woodNormal2 = Core::LoadTexture("textures/wood_2/wood_normal.png"); texture::woodNormal2 = Core::LoadTexture("textures/wood_2/wood_normal.png");
texture::woodARM2 = Core::LoadTexture("textures/wood_2/wood_arm.png"); texture::woodARM2 = Core::LoadTexture("textures/wood_2/wood_arm.png");
@ -683,9 +746,9 @@ void init(GLFWwindow* window)
texture::woodNormal3 = Core::LoadTexture("textures/wood_3/wood_normal.png"); texture::woodNormal3 = Core::LoadTexture("textures/wood_3/wood_normal.png");
texture::woodARM3 = Core::LoadTexture("textures/wood_3/wood_arm.png"); texture::woodARM3 = Core::LoadTexture("textures/wood_3/wood_arm.png");
texture::carpet = Core::LoadTexture("textures/carpet/carpet.jpg"); texture::carpet = Core::LoadTexture("textures/carpet2/carpet.jpg");
texture::carpetNormal = Core::LoadTexture("textures/carpet/carpet_normal.png"); texture::carpetNormal = Core::LoadTexture("textures/carpet2/carpet_norm.jpg");
texture::carpetARM = Core::LoadTexture("textures/carpet/carpet_arm.png"); texture::carpetARM = Core::LoadTexture("textures/carpet2/carpet_arm.jpg");
texture::black = Core::LoadTexture("textures/black/black.png"); texture::black = Core::LoadTexture("textures/black/black.png");
texture::blackNormal = Core::LoadTexture("textures/black/black_normal.png"); texture::blackNormal = Core::LoadTexture("textures/black/black_normal.png");
@ -704,13 +767,24 @@ void init(GLFWwindow* window)
texture::whiteARM = Core::LoadTexture("textures/red/red_arm.png"); texture::whiteARM = Core::LoadTexture("textures/red/red_arm.png");
texture::redLeather = Core::LoadTexture("textures/leather/leather_red_03_coll1_4k.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::redLeatherNormal = Core::LoadTexture("textures/leather/leather_red_03_nor_gl_4k.jpg");
texture::redLeatherARM = Core::LoadTexture("textures/leather/leather_red_03_arm_4k.png"); texture::redLeatherARM = Core::LoadTexture("textures/leather/leather_red_03_arm_4k.jpg");
texture::door = Core::LoadTexture("textures/door/door.jpg"); texture::door = Core::LoadTexture("textures/door/door.jpg");
texture::doorNorm = Core::LoadTexture("textures/door/door_norm.jpg"); texture::doorNorm = Core::LoadTexture("textures/door/door_norm.jpg");
texture::doorArm = Core::LoadTexture("textures/door/door_arm.jpg"); texture::doorArm = Core::LoadTexture("textures/door/door_arm.jpg");
texture::wood = Core::LoadTexture("textures/wood_4/wood.jpg");
texture::woodNormal = Core::LoadTexture("textures/wood_4/wood_normal.jpg");
texture::woodARM = Core::LoadTexture("textures/wood_4/wood_arm.jpg");
texture::metal = Core::LoadTexture("textures/lamp/metal.jpg");
texture::metalNormal = Core::LoadTexture("textures/lamp/metal_norm.jpg");
texture::metalARM = Core::LoadTexture("textures/lamp/metal_arm.jpg");
texture::rust = Core::LoadTexture("textures/rust/rust.jpg");
texture::rustNormal = Core::LoadTexture("textures/rust/rust_norm.jpg");
texture::rustARM = Core::LoadTexture("textures/rust/rust_arm.jpg");
loadModelToContext("./models/sphere.obj", sphereContext); loadModelToContext("./models/sphere.obj", sphereContext);
loadModelToContext("./models/cube.obj", cubeContext); loadModelToContext("./models/cube.obj", cubeContext);
@ -718,7 +792,7 @@ void init(GLFWwindow* window)
loadModelToContext("./models/coffeeTable.obj", models::coffeeTableContext); loadModelToContext("./models/coffeeTable.obj", models::coffeeTableContext);
loadModelToContext("./models/door.obj", models::doorContext); loadModelToContext("./models/door.obj", models::doorContext);
loadModelToContext("./models/drawer.obj", models::drawerContext); loadModelToContext("./models/drawer.obj", models::drawerContext);
loadModelToContext("./models/plane.obj", models::planeContext); loadModelToContext("./models/plane2.obj", models::planeContext);
loadModelToContext("./models/room/room_with_roof.obj", models::roomContext); loadModelToContext("./models/room/room_with_roof.obj", models::roomContext);
//loadModelToContext("./models/roof/roof.obj", models::roofContext); //loadModelToContext("./models/roof/roof.obj", models::roofContext);
loadModelToContext("./models/spaceship.obj", models::spaceshipContext); loadModelToContext("./models/spaceship.obj", models::spaceshipContext);
@ -740,6 +814,7 @@ void init(GLFWwindow* window)
loadModelToContext("./models/easel/easel3.obj", models::easelContext); loadModelToContext("./models/easel/easel3.obj", models::easelContext);
loadModelToContext("./models/car/car.obj", models::carContext); loadModelToContext("./models/car/car.obj", models::carContext);
loadModelToContext("./models/ceramic_vase_02_4k.obj", models::vaseContext); loadModelToContext("./models/ceramic_vase_02_4k.obj", models::vaseContext);
loadModelToContext("./models/side_table.obj", models::sideTableContext);
initDepthMap(); initDepthMap();
initDepthMapShip(); initDepthMapShip();

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 MiB

View File

Before

Width:  |  Height:  |  Size: 14 MiB

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 MiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 MiB