Light on textures
@ -2,7 +2,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<ProjectOutputs>
|
<ProjectOutputs>
|
||||||
<ProjectOutput>
|
<ProjectOutput>
|
||||||
<FullPath>C:\Users\Serhii\source\repos\GRK_game_scene2\Debug\grk-cw9.exe</FullPath>
|
<FullPath>C:\Users\Serhii\source\repos\GRK_game_scene\Debug\grk-cw9.exe</FullPath>
|
||||||
</ProjectOutput>
|
</ProjectOutput>
|
||||||
</ProjectOutputs>
|
</ProjectOutputs>
|
||||||
<ContentFiles />
|
<ContentFiles />
|
||||||
|
@ -1,62 +1,62 @@
|
|||||||
main.cpp
|
main.cpp
|
||||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(130,1): warning C4005: 'APIENTRY': macro redefinition
|
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(130,1): warning C4005: 'APIENTRY': macro redefinition
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : see previous definition of 'APIENTRY'
|
C:\Users\Serhii\source\repos\GRK_game_scene\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : see previous definition of 'APIENTRY'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(151,30): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(159,30): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(205,38): warning C4305: '=': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(213,38): warning C4305: '=': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(228,16): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(236,16): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(269,20): warning C4018: '<': signed/unsigned mismatch
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(284,20): warning C4018: '<': signed/unsigned mismatch
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(344,20): warning C4018: '<': signed/unsigned mismatch
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(390,20): warning C4018: '<': signed/unsigned mismatch
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(374,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(420,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(388,98): warning C4305: 'argument': truncation from 'double' to 'T'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(434,98): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
with
|
with
|
||||||
[
|
[
|
||||||
T=float
|
T=float
|
||||||
]
|
]
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(391,68): warning C4305: 'argument': truncation from 'double' to 'T'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(437,68): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
with
|
with
|
||||||
[
|
[
|
||||||
T=float
|
T=float
|
||||||
]
|
]
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(429,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(475,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(461,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(507,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(490,80): warning C4305: 'argument': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(536,80): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(499,80): warning C4305: 'argument': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(545,80): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(522,80): warning C4305: 'argument': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(568,80): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(585,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(631,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(596,108): warning C4305: 'argument': truncation from 'double' to 'T'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(642,108): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
with
|
with
|
||||||
[
|
[
|
||||||
T=float
|
T=float
|
||||||
]
|
]
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(604,87): warning C4305: 'argument': truncation from 'double' to 'T'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(650,87): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
with
|
with
|
||||||
[
|
[
|
||||||
T=float
|
T=float
|
||||||
]
|
]
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(604,223): warning C4305: 'argument': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(650,223): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(607,59): warning C4305: 'argument': truncation from 'double' to 'T'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(653,59): warning C4305: 'argument': truncation from 'double' to 'T'
|
||||||
with
|
with
|
||||||
[
|
[
|
||||||
T=float
|
T=float
|
||||||
]
|
]
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(608,37): warning C4305: 'argument': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(654,37): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(680,20): warning C4018: '<': signed/unsigned mismatch
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(708,20): warning C4018: '<': signed/unsigned mismatch
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(685,50): warning C4305: 'argument': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(713,50): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(686,51): warning C4305: 'argument': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(714,51): warning C4305: 'argument': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(763,21): warning C4018: '<': signed/unsigned mismatch
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(791,21): warning C4018: '<': signed/unsigned mismatch
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(765,49): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(793,49): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(788,17): warning C4101: 'data': unreferenced local variable
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(816,17): warning C4101: 'data': unreferenced local variable
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(905,28): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(934,28): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(906,28): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(935,28): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(907,28): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(936,28): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(930,32): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(959,32): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(931,32): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(960,32): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(932,32): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(961,32): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(968,28): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(997,28): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(969,28): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(998,28): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(970,28): warning C4305: 'initializing': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(999,28): warning C4305: 'initializing': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(1090,21): warning C4305: '-=': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(1156,21): warning C4305: '-=': truncation from 'double' to 'float'
|
||||||
C:\Users\Serhii\source\repos\GRK_game_scene2\cw 9\src\ex_9_1.hpp(1092,21): warning C4305: '+=': truncation from 'double' to 'float'
|
C:\Users\Serhii\source\repos\GRK_game_scene\cw 9\src\ex_9_1.hpp(1158,21): warning C4305: '+=': truncation from 'double' to 'float'
|
||||||
Box.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
|
Box.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
|
||||||
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
|
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
|
||||||
grk-cw9.vcxproj -> C:\Users\Serhii\source\repos\GRK_game_scene2\Debug\grk-cw9.exe
|
grk-cw9.vcxproj -> C:\Users\Serhii\source\repos\GRK_game_scene\Debug\grk-cw9.exe
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0:VcpkgTriplet=x86-windows:
|
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0:
|
||||||
Debug|Win32|C:\Users\Serhii\source\repos\GRK_game_scene2\|
|
Debug|Win32|C:\Users\Serhii\source\repos\GRK_game_scene\|
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
# www.blender.org
|
# www.blender.org
|
||||||
mtllib roof.mtl
|
mtllib roof.mtl
|
||||||
o roof
|
o roof
|
||||||
v -2.000000 2.190000 2.500000
|
v -2.000000 2.190001 -2.499999
|
||||||
v 2.000000 2.190000 2.500000
|
v 2.000000 2.190001 -2.499999
|
||||||
v -2.000000 2.190001 -2.500000
|
v -2.000000 2.189999 2.500001
|
||||||
v 2.000000 2.190001 -2.500000
|
v 2.000000 2.189999 2.500001
|
||||||
vn -0.0000 1.0000 -0.0000
|
vn -0.0000 -1.0000 -0.0000
|
||||||
vt 0.000000 0.000000
|
vt 0.000000 0.000000
|
||||||
vt 1.000000 0.000000
|
vt 1.000000 0.000000
|
||||||
vt 0.000000 1.000000
|
vt 0.000000 1.000000
|
||||||
|
273
cw 9/models/roomInside.obj
Normal file
@ -0,0 +1,273 @@
|
|||||||
|
# Blender 3.4.1
|
||||||
|
# www.blender.org
|
||||||
|
mtllib roomInside.mtl
|
||||||
|
o room_Cube.001
|
||||||
|
v -1.800000 -0.000000 2.299999
|
||||||
|
v 1.800000 0.000000 -2.300000
|
||||||
|
v 1.800000 2.300000 -2.300000
|
||||||
|
v 1.800000 -0.000000 2.299999
|
||||||
|
v 1.800000 2.299999 2.300000
|
||||||
|
v -1.800000 0.000000 -2.300000
|
||||||
|
v -1.800000 2.299999 2.300000
|
||||||
|
v -1.800000 2.300000 -2.300000
|
||||||
|
v -1.800000 -0.000000 2.299999
|
||||||
|
v -1.800000 0.000000 -2.300000
|
||||||
|
v -1.800000 -0.000000 2.300000
|
||||||
|
v -1.800000 2.300000 2.300000
|
||||||
|
v -1.800000 2.300001 -2.299999
|
||||||
|
v 1.800000 -0.000000 2.300000
|
||||||
|
v 1.800000 0.000000 -2.300000
|
||||||
|
v 1.800000 2.300001 -2.299999
|
||||||
|
v 1.800000 2.300000 2.300000
|
||||||
|
v 1.800000 2.300000 -2.299999
|
||||||
|
v 1.800000 2.299999 2.300000
|
||||||
|
v -1.800000 2.300000 -2.299999
|
||||||
|
v -1.800000 2.299999 2.300000
|
||||||
|
v -0.480000 2.300001 -2.300000
|
||||||
|
v -0.480000 -0.000000 2.299999
|
||||||
|
v -0.480000 0.000000 -2.300000
|
||||||
|
v -0.480000 2.300000 2.300000
|
||||||
|
v -0.480000 2.300000 -2.299999
|
||||||
|
v -0.480000 2.299999 2.300000
|
||||||
|
v 0.480000 2.300001 -2.300000
|
||||||
|
v 0.480000 -0.000000 2.299999
|
||||||
|
v 0.480000 2.300000 -2.299999
|
||||||
|
v 0.480000 2.299999 2.300000
|
||||||
|
v 0.480000 0.000000 -2.300000
|
||||||
|
v 0.480000 2.299999 2.300000
|
||||||
|
v -1.800000 1.970000 2.300000
|
||||||
|
v 1.800000 1.970000 2.300000
|
||||||
|
v 1.800000 1.970000 -2.300000
|
||||||
|
v -1.800000 1.970000 -2.300000
|
||||||
|
v -1.800000 1.970000 2.300000
|
||||||
|
v 1.800000 1.970000 -2.300000
|
||||||
|
v 1.800000 1.970000 2.300000
|
||||||
|
v -1.800000 1.970000 2.300000
|
||||||
|
v -1.800000 1.970000 -2.300000
|
||||||
|
v -0.480000 1.970000 2.300000
|
||||||
|
v -0.480000 1.970000 -2.300000
|
||||||
|
v 0.480000 1.970000 2.300000
|
||||||
|
v 0.480000 1.970000 -2.300000
|
||||||
|
v -1.800000 -0.000000 0.750000
|
||||||
|
v -1.800000 2.300000 0.750000
|
||||||
|
v 1.800000 -0.000000 0.750000
|
||||||
|
v 1.800000 2.300000 0.750000
|
||||||
|
v 1.800000 2.300000 0.750000
|
||||||
|
v -1.800000 2.300000 0.750000
|
||||||
|
v -0.480000 2.300000 0.750000
|
||||||
|
v 0.480000 2.300000 0.750000
|
||||||
|
v -1.800000 1.970000 0.750000
|
||||||
|
v 1.800000 1.970000 0.750000
|
||||||
|
v -1.800000 2.300000 -0.250000
|
||||||
|
v 1.800000 0.000000 -0.250000
|
||||||
|
v -1.800000 1.970000 -0.250000
|
||||||
|
v -1.800000 0.000000 -0.250000
|
||||||
|
v 1.800000 2.300000 -0.250000
|
||||||
|
v 1.800000 2.300000 -0.250000
|
||||||
|
v -1.800000 2.300000 -0.250000
|
||||||
|
v -0.480000 2.300000 -0.250000
|
||||||
|
v 0.480000 2.300000 -0.250000
|
||||||
|
v 1.800000 1.970000 -0.250000
|
||||||
|
v 1.800000 1.015374 2.300000
|
||||||
|
v 1.800000 1.015374 -2.300000
|
||||||
|
v -1.800000 1.015374 -2.300000
|
||||||
|
v -1.800000 1.015374 2.300000
|
||||||
|
v 1.800000 1.015374 -2.300000
|
||||||
|
v 1.800000 1.015374 2.300000
|
||||||
|
v -1.800000 1.015374 2.300000
|
||||||
|
v -1.800000 1.015374 -2.300000
|
||||||
|
v -0.480000 1.015374 2.300000
|
||||||
|
v -0.480000 1.015374 -2.300000
|
||||||
|
v 0.480000 1.015374 2.300000
|
||||||
|
v 0.480000 1.015374 -2.300000
|
||||||
|
v -1.800000 1.015374 2.300000
|
||||||
|
v 1.800000 1.015374 0.750000
|
||||||
|
v -1.800000 1.015374 0.750000
|
||||||
|
v 1.800000 1.015374 -0.250000
|
||||||
|
v -1.800000 1.015374 -0.250000
|
||||||
|
vn -0.0000 -0.0000 -1.0000
|
||||||
|
vn -0.0000 0.0708 -0.9975
|
||||||
|
vn -0.0000 -0.9352 -0.3542
|
||||||
|
vn -0.0003 0.1694 -0.9855
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -0.0000 -0.1253 0.9921
|
||||||
|
vn -0.0000 0.7971 0.6039
|
||||||
|
vn 0.0004 -0.2543 0.9671
|
||||||
|
vn -0.0000 1.0000 -0.0000
|
||||||
|
vn -0.9650 0.2624 -0.0000
|
||||||
|
vn -0.9873 0.1586 -0.0000
|
||||||
|
vn 0.9988 0.0490 -0.0000
|
||||||
|
vn 0.9956 0.0935 -0.0000
|
||||||
|
vn 1.0000 -0.0000 -0.0000
|
||||||
|
vn -1.0000 -0.0000 -0.0000
|
||||||
|
vn -0.0000 -0.0153 0.9999
|
||||||
|
vn -0.0000 -0.0255 0.9997
|
||||||
|
vn -0.0000 -0.8869 -0.4619
|
||||||
|
vn -0.0000 0.1419 -0.9899
|
||||||
|
vn -0.0000 0.3353 -0.9421
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0000 -0.2543 0.9671
|
||||||
|
vn -0.9981 -0.0523 0.0322
|
||||||
|
vn -0.9999 0.0154 -0.0000
|
||||||
|
vn -1.0000 0.0092 -0.0000
|
||||||
|
vn 1.0000 0.0079 -0.0000
|
||||||
|
vn 0.9999 0.0150 -0.0000
|
||||||
|
vn -0.9983 0.0492 0.0322
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.375000 0.481764
|
||||||
|
vt 0.625000 0.481764
|
||||||
|
vt 0.643236 0.500000
|
||||||
|
vt 0.375000 0.768236
|
||||||
|
vt 0.643236 0.750000
|
||||||
|
vt 0.625000 0.768236
|
||||||
|
vt 0.375000 0.307136
|
||||||
|
vt 0.817864 0.750000
|
||||||
|
vt 0.625000 0.942864
|
||||||
|
vt 0.817864 0.500000
|
||||||
|
vt 0.625000 0.307136
|
||||||
|
vt 0.375000 0.942864
|
||||||
|
vt 0.375000 0.237945
|
||||||
|
vt 0.375000 0.016152
|
||||||
|
vt 0.875000 0.733848
|
||||||
|
vt 0.625000 0.016152
|
||||||
|
vt 0.625000 0.237945
|
||||||
|
vt 0.875000 0.512055
|
||||||
|
vt 0.375000 0.733848
|
||||||
|
vt 0.375000 0.512055
|
||||||
|
vt 0.625000 0.512055
|
||||||
|
vt 0.625000 0.733848
|
||||||
|
vt 0.643236 0.512055
|
||||||
|
vt 0.643236 0.733848
|
||||||
|
vt 0.817864 0.512055
|
||||||
|
vt 0.817864 0.733848
|
||||||
|
vt 0.752288 0.500000
|
||||||
|
vt 0.625000 0.372712
|
||||||
|
vt 0.375000 0.877288
|
||||||
|
vt 0.375000 0.372712
|
||||||
|
vt 0.625000 0.877288
|
||||||
|
vt 0.752288 0.750000
|
||||||
|
vt 0.752288 0.512055
|
||||||
|
vt 0.752288 0.733848
|
||||||
|
vt 0.696414 0.500000
|
||||||
|
vt 0.625000 0.428586
|
||||||
|
vt 0.375000 0.821414
|
||||||
|
vt 0.696414 0.512055
|
||||||
|
vt 0.696414 0.733848
|
||||||
|
vt 0.375000 0.428586
|
||||||
|
vt 0.696414 0.750000
|
||||||
|
vt 0.625000 0.821414
|
||||||
|
vt 0.571865 0.000000
|
||||||
|
vt 0.571865 1.000000
|
||||||
|
vt 0.571865 0.768236
|
||||||
|
vt 0.571865 0.481764
|
||||||
|
vt 0.571865 0.307136
|
||||||
|
vt 0.571865 0.942864
|
||||||
|
vt 0.571865 0.512055
|
||||||
|
vt 0.571865 0.733848
|
||||||
|
vt 0.571865 0.016152
|
||||||
|
vt 0.571865 0.237945
|
||||||
|
vt 0.571865 0.877288
|
||||||
|
vt 0.571865 0.372712
|
||||||
|
vt 0.571865 0.821414
|
||||||
|
vt 0.571865 0.428586
|
||||||
|
vt 0.375000 0.127048
|
||||||
|
vt 0.875000 0.622952
|
||||||
|
vt 0.625000 0.127048
|
||||||
|
vt 0.375000 0.622952
|
||||||
|
vt 0.625000 0.622952
|
||||||
|
vt 0.643236 0.622952
|
||||||
|
vt 0.817864 0.622952
|
||||||
|
vt 0.752288 0.622952
|
||||||
|
vt 0.696414 0.622952
|
||||||
|
vt 0.571865 0.127048
|
||||||
|
vt 0.571865 0.622952
|
||||||
|
vt 0.875000 0.567503
|
||||||
|
vt 0.625000 0.182497
|
||||||
|
vt 0.375000 0.567503
|
||||||
|
vt 0.571865 0.182497
|
||||||
|
vt 0.375000 0.182497
|
||||||
|
vt 0.625000 0.567503
|
||||||
|
vt 0.643236 0.567503
|
||||||
|
vt 0.817864 0.567503
|
||||||
|
vt 0.752288 0.567503
|
||||||
|
vt 0.696414 0.567503
|
||||||
|
vt 0.571865 0.567503
|
||||||
|
vt 0.476468 0.768236
|
||||||
|
vt 0.476468 0.481764
|
||||||
|
vt 0.476468 0.307136
|
||||||
|
vt 0.476468 0.942864
|
||||||
|
vt 0.476468 0.512055
|
||||||
|
vt 0.476468 0.733848
|
||||||
|
vt 0.476468 0.016152
|
||||||
|
vt 0.476468 0.237945
|
||||||
|
vt 0.476468 0.877288
|
||||||
|
vt 0.476468 0.372712
|
||||||
|
vt 0.476468 0.821414
|
||||||
|
vt 0.476468 0.428586
|
||||||
|
vt 0.476468 1.000000
|
||||||
|
vt 0.476468 0.000000
|
||||||
|
vt 0.476468 0.622952
|
||||||
|
vt 0.476468 0.127048
|
||||||
|
vt 0.476468 0.567503
|
||||||
|
vt 0.476468 0.182497
|
||||||
|
s 0
|
||||||
|
usemtl None
|
||||||
|
f 46/58/1 28/38/1 3/4/1 36/48/1
|
||||||
|
f 27/36/2 21/28/3 7/10/3 25/34/4
|
||||||
|
f 43/55/5 25/33/5 7/11/5 38/50/5
|
||||||
|
f 22/29/6 8/12/7 20/27/7 26/35/8
|
||||||
|
f 53/66/9 52/65/9 21/28/9 27/36/9
|
||||||
|
f 50/63/10 51/64/11 19/26/11 17/24/10
|
||||||
|
f 52/65/12 48/60/13 12/17/13 21/28/12
|
||||||
|
f 56/69/14 50/63/14 17/24/14 40/52/14
|
||||||
|
f 59/73/15 57/71/15 13/19/15 42/54/15
|
||||||
|
f 54/67/9 53/66/9 27/36/9 31/41/9
|
||||||
|
f 28/37/16 22/29/16 26/35/17 30/40/17
|
||||||
|
f 45/57/5 33/44/5 25/33/5 43/55/5
|
||||||
|
f 31/41/18 27/36/19 25/34/20 33/43/18
|
||||||
|
f 37/49/1 8/13/1 22/30/1 44/56/1
|
||||||
|
f 19/26/21 31/41/21 33/43/21 5/7/21
|
||||||
|
f 35/47/5 5/8/5 33/44/5 45/57/5
|
||||||
|
f 3/5/7 28/37/6 30/40/22 18/25/7
|
||||||
|
f 51/64/9 54/67/9 31/41/9 19/26/9
|
||||||
|
f 44/56/1 22/30/1 28/38/1 46/58/1
|
||||||
|
f 67/81/5 35/47/5 45/57/5 77/91/5
|
||||||
|
f 69/83/1 37/49/1 44/56/1 76/90/1
|
||||||
|
f 77/91/5 45/57/5 43/55/5 75/89/5
|
||||||
|
f 83/98/15 59/73/15 42/54/15 74/88/15
|
||||||
|
f 79/94/1 34/45/1 41/53/1 73/87/1
|
||||||
|
f 80/95/14 56/69/14 40/52/14 72/86/14
|
||||||
|
f 75/89/5 43/55/5 38/50/5 70/84/5
|
||||||
|
f 78/92/1 46/58/1 36/48/1 68/82/1
|
||||||
|
f 70/84/5 38/50/5 34/46/5 79/93/5
|
||||||
|
f 82/97/14 66/80/14 56/69/14 80/95/14
|
||||||
|
f 73/87/23 41/53/23 55/68/23 81/96/23
|
||||||
|
f 62/76/9 65/79/9 54/67/9 51/64/9
|
||||||
|
f 65/79/9 64/78/9 53/66/9 54/67/9
|
||||||
|
f 41/53/15 12/18/15 48/61/15 55/68/15
|
||||||
|
f 66/80/14 61/75/14 50/63/14 56/69/14
|
||||||
|
f 63/77/14 57/70/14 48/60/14 52/65/14
|
||||||
|
f 61/75/15 62/76/15 51/64/15 50/63/15
|
||||||
|
f 64/78/9 63/77/9 52/65/9 53/66/9
|
||||||
|
f 26/35/9 20/27/9 63/77/9 64/78/9
|
||||||
|
f 16/23/24 18/25/25 62/76/25 61/75/24
|
||||||
|
f 20/27/26 13/20/27 57/70/27 63/77/26
|
||||||
|
f 39/51/14 16/23/14 61/75/14 66/80/14
|
||||||
|
f 30/40/9 26/35/9 64/78/9 65/79/9
|
||||||
|
f 18/25/9 30/40/9 65/79/9 62/76/9
|
||||||
|
f 71/85/14 39/51/14 66/80/14 82/97/14
|
||||||
|
f 55/68/15 48/61/15 57/71/15 59/73/15
|
||||||
|
f 47/59/15 81/96/15 83/98/15 60/74/15
|
||||||
|
f 15/22/14 71/85/14 82/97/14 58/72/14
|
||||||
|
f 11/16/28 73/87/28 81/96/28 47/59/28
|
||||||
|
f 58/72/14 82/97/14 80/95/14 49/62/14
|
||||||
|
f 9/14/1 70/84/1 79/93/1 1/1/1
|
||||||
|
f 32/42/1 78/92/1 68/82/1 2/3/1
|
||||||
|
f 23/31/5 75/89/5 70/84/5 9/14/5
|
||||||
|
f 49/62/14 80/95/14 72/86/14 14/21/14
|
||||||
|
f 1/2/14 79/94/14 73/87/14 11/16/14
|
||||||
|
f 60/74/15 83/98/15 74/88/15 10/15/15
|
||||||
|
f 29/39/5 77/91/5 75/89/5 23/31/5
|
||||||
|
f 6/9/1 69/83/1 76/90/1 24/32/1
|
||||||
|
f 4/6/5 67/81/5 77/91/5 29/39/5
|
386
cw 9/models/roomOutside.obj
Normal file
@ -0,0 +1,386 @@
|
|||||||
|
# Blender 3.4.1
|
||||||
|
# www.blender.org
|
||||||
|
mtllib roomInside.mtl
|
||||||
|
o room_Cube.002
|
||||||
|
v -2.000000 -0.000000 2.500000
|
||||||
|
v -2.000000 2.500000 2.500000
|
||||||
|
v -2.000000 0.000000 -2.500000
|
||||||
|
v -2.000000 2.500000 -2.500000
|
||||||
|
v 2.000000 -0.000000 2.500000
|
||||||
|
v 2.000000 2.500000 2.500000
|
||||||
|
v 2.000000 0.000000 -2.500000
|
||||||
|
v 2.000000 2.500000 -2.500000
|
||||||
|
v 1.800000 0.000000 -2.500000
|
||||||
|
v 1.800000 2.500000 -2.500000
|
||||||
|
v 1.800000 -0.000000 2.500000
|
||||||
|
v 1.800000 2.500000 2.500000
|
||||||
|
v -1.800000 0.000000 -2.500000
|
||||||
|
v -1.800000 2.500000 2.500000
|
||||||
|
v -1.800000 2.500000 -2.500000
|
||||||
|
v -1.800000 -0.000000 2.500000
|
||||||
|
v -2.000000 0.000000 -2.300000
|
||||||
|
v -2.000000 -0.000000 2.300000
|
||||||
|
v -2.000000 2.500000 2.300000
|
||||||
|
v -2.000000 2.500000 -2.299999
|
||||||
|
v 2.000000 -0.000000 2.300000
|
||||||
|
v 2.000000 0.000000 -2.300000
|
||||||
|
v 2.000000 2.500000 -2.299999
|
||||||
|
v 2.000000 2.500000 2.300000
|
||||||
|
v 1.800000 2.500000 -2.299999
|
||||||
|
v 1.800000 2.500000 2.300000
|
||||||
|
v 1.800000 0.000000 -2.300000
|
||||||
|
v 1.800000 -0.000000 2.300000
|
||||||
|
v -1.800000 0.000000 -2.300000
|
||||||
|
v -1.800000 -0.000000 2.300000
|
||||||
|
v -1.800000 2.500000 -2.299999
|
||||||
|
v -1.800000 2.500000 2.300000
|
||||||
|
v -0.480000 2.500000 -2.500000
|
||||||
|
v -0.480000 -0.000000 2.500000
|
||||||
|
v -0.480000 0.000000 -2.500000
|
||||||
|
v -0.480000 2.500000 2.500000
|
||||||
|
v -0.480000 2.500000 -2.299999
|
||||||
|
v -0.480000 2.500000 2.300000
|
||||||
|
v -0.480000 0.000000 -2.300000
|
||||||
|
v -0.480000 -0.000000 2.300000
|
||||||
|
v 0.480000 2.500000 -2.500000
|
||||||
|
v 0.480000 -0.000000 2.500000
|
||||||
|
v 0.480000 2.500000 -2.299999
|
||||||
|
v 0.480000 2.500000 2.300000
|
||||||
|
v 0.480000 0.000000 -2.500000
|
||||||
|
v 0.480000 2.500000 2.500000
|
||||||
|
v 0.480000 0.000000 -2.300000
|
||||||
|
v 0.480000 -0.000000 2.300000
|
||||||
|
v -2.000000 1.970000 2.500000
|
||||||
|
v -2.000000 1.970000 -2.500000
|
||||||
|
v 2.000000 1.970000 -2.500000
|
||||||
|
v 2.000000 1.970000 2.500000
|
||||||
|
v 1.800000 1.970000 2.500000
|
||||||
|
v 1.800000 1.970000 -2.500000
|
||||||
|
v -1.800000 1.970000 -2.500000
|
||||||
|
v -1.800000 1.970000 2.500000
|
||||||
|
v 2.000000 1.970000 -2.300000
|
||||||
|
v 2.000000 1.970000 2.300000
|
||||||
|
v -2.000000 1.970000 2.300000
|
||||||
|
v -2.000000 1.970000 -2.300000
|
||||||
|
v -0.480000 1.970000 2.500000
|
||||||
|
v -0.480000 1.970000 -2.500000
|
||||||
|
v 0.480000 1.970000 2.500000
|
||||||
|
v 0.480000 1.970000 -2.500000
|
||||||
|
v -2.129002 0.119259 -2.366217
|
||||||
|
v -0.480000 1.970000 -2.300000
|
||||||
|
v 0.480000 1.970000 -2.300000
|
||||||
|
v -2.000000 -0.000000 0.750000
|
||||||
|
v -2.000000 2.500000 0.750000
|
||||||
|
v 2.000000 -0.000000 0.750000
|
||||||
|
v 2.000000 2.500000 0.750000
|
||||||
|
v 1.800000 2.500000 0.750000
|
||||||
|
v 1.800000 -0.000000 0.750000
|
||||||
|
v -1.800000 -0.000000 0.750000
|
||||||
|
v -1.800000 2.500000 0.750000
|
||||||
|
v -0.480000 2.500000 0.750000
|
||||||
|
v 0.480000 2.500000 0.750000
|
||||||
|
v -2.000000 1.970000 0.750000
|
||||||
|
v 2.000000 1.970000 0.750000
|
||||||
|
v -1.800000 1.970000 0.750000
|
||||||
|
v -2.000000 2.500000 -0.250000
|
||||||
|
v 2.000000 0.000000 -0.250000
|
||||||
|
v -2.000000 1.970000 -0.250000
|
||||||
|
v -2.000000 0.000000 -0.250000
|
||||||
|
v 2.000000 2.500000 -0.250000
|
||||||
|
v 1.800000 2.500000 -0.250000
|
||||||
|
v 1.800000 0.000000 -0.250000
|
||||||
|
v -2.129002 0.119259 -0.816217
|
||||||
|
v -1.800000 2.500000 -0.250000
|
||||||
|
v -0.480000 2.500000 -0.250000
|
||||||
|
v 0.480000 2.500000 -0.250000
|
||||||
|
v 2.000000 1.970000 -0.250000
|
||||||
|
v -1.800000 1.970000 -0.250000
|
||||||
|
v -2.000000 1.015374 -2.500000
|
||||||
|
v 2.000000 1.015374 -2.500000
|
||||||
|
v 2.000000 1.015374 2.500000
|
||||||
|
v 1.800000 1.015374 2.500000
|
||||||
|
v 1.800000 1.015374 -2.500000
|
||||||
|
v -1.800000 1.015374 -2.500000
|
||||||
|
v -1.800000 1.015374 2.500000
|
||||||
|
v 2.000000 1.015374 -2.300000
|
||||||
|
v 2.000000 1.015374 2.300000
|
||||||
|
v -2.000000 1.015374 2.300000
|
||||||
|
v -2.000000 1.015374 -2.300000
|
||||||
|
v -1.929001 0.119259 -2.366217
|
||||||
|
v -0.480000 1.015374 2.500000
|
||||||
|
v -0.480000 1.015374 -2.500000
|
||||||
|
v 0.480000 1.015374 2.500000
|
||||||
|
v 0.480000 1.015374 -2.500000
|
||||||
|
v -2.000000 1.015374 2.500000
|
||||||
|
v -0.480000 1.015374 -2.300000
|
||||||
|
v 0.480000 1.015374 -2.300000
|
||||||
|
v -1.800000 1.015374 0.750000
|
||||||
|
v 2.000000 1.015374 0.750000
|
||||||
|
v -2.000000 1.015374 0.750000
|
||||||
|
v 2.000000 1.015374 -0.250000
|
||||||
|
v -1.800000 1.015374 -0.250000
|
||||||
|
v -2.000000 1.015374 -0.250000
|
||||||
|
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
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.375000 0.000000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.375000 0.250000
|
||||||
|
vt 0.625000 0.250000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.356764 0.500000
|
||||||
|
vt 0.375000 0.481764
|
||||||
|
vt 0.625000 0.481764
|
||||||
|
vt 0.643236 0.500000
|
||||||
|
vt 0.356764 0.750000
|
||||||
|
vt 0.375000 0.768236
|
||||||
|
vt 0.643236 0.750000
|
||||||
|
vt 0.625000 0.768236
|
||||||
|
vt 0.182136 0.500000
|
||||||
|
vt 0.375000 0.307136
|
||||||
|
vt 0.817864 0.750000
|
||||||
|
vt 0.625000 0.942864
|
||||||
|
vt 0.817864 0.500000
|
||||||
|
vt 0.625000 0.307136
|
||||||
|
vt 0.182136 0.750000
|
||||||
|
vt 0.375000 0.942864
|
||||||
|
vt 0.125000 0.512055
|
||||||
|
vt 0.375000 0.237945
|
||||||
|
vt 0.125000 0.733848
|
||||||
|
vt 0.375000 0.016152
|
||||||
|
vt 0.875000 0.733848
|
||||||
|
vt 0.625000 0.016152
|
||||||
|
vt 0.625000 0.237945
|
||||||
|
vt 0.875000 0.512055
|
||||||
|
vt 0.375000 0.733848
|
||||||
|
vt 0.375000 0.512055
|
||||||
|
vt 0.625000 0.512055
|
||||||
|
vt 0.625000 0.733848
|
||||||
|
vt 0.643236 0.512055
|
||||||
|
vt 0.643236 0.733848
|
||||||
|
vt 0.356764 0.512055
|
||||||
|
vt 0.356764 0.733848
|
||||||
|
vt 0.182136 0.512055
|
||||||
|
vt 0.182136 0.733848
|
||||||
|
vt 0.817864 0.512055
|
||||||
|
vt 0.817864 0.733848
|
||||||
|
vt 0.752288 0.500000
|
||||||
|
vt 0.625000 0.372712
|
||||||
|
vt 0.247712 0.750000
|
||||||
|
vt 0.375000 0.877288
|
||||||
|
vt 0.247712 0.500000
|
||||||
|
vt 0.375000 0.372712
|
||||||
|
vt 0.625000 0.877288
|
||||||
|
vt 0.752288 0.750000
|
||||||
|
vt 0.752288 0.512055
|
||||||
|
vt 0.752288 0.733848
|
||||||
|
vt 0.247712 0.512055
|
||||||
|
vt 0.247712 0.733848
|
||||||
|
vt 0.696414 0.500000
|
||||||
|
vt 0.625000 0.428586
|
||||||
|
vt 0.303586 0.750000
|
||||||
|
vt 0.375000 0.821414
|
||||||
|
vt 0.696414 0.512055
|
||||||
|
vt 0.696414 0.733848
|
||||||
|
vt 0.303586 0.500000
|
||||||
|
vt 0.375000 0.428586
|
||||||
|
vt 0.696414 0.750000
|
||||||
|
vt 0.625000 0.821414
|
||||||
|
vt 0.303586 0.512055
|
||||||
|
vt 0.303586 0.733848
|
||||||
|
vt 0.571865 0.000000
|
||||||
|
vt 0.571865 1.000000
|
||||||
|
vt 0.571865 0.250000
|
||||||
|
vt 0.571865 0.500000
|
||||||
|
vt 0.571865 0.750000
|
||||||
|
vt 0.571865 0.768236
|
||||||
|
vt 0.571865 0.481764
|
||||||
|
vt 0.571865 0.307136
|
||||||
|
vt 0.571865 0.942864
|
||||||
|
vt 0.571865 0.512055
|
||||||
|
vt 0.571865 0.733848
|
||||||
|
vt 0.571865 0.016152
|
||||||
|
vt 0.571865 0.237945
|
||||||
|
vt 0.571865 0.877288
|
||||||
|
vt 0.571865 0.372712
|
||||||
|
vt 0.571865 0.821414
|
||||||
|
vt 0.571865 0.428586
|
||||||
|
vt 0.247712 0.512055
|
||||||
|
vt 0.303586 0.512055
|
||||||
|
vt 0.125000 0.622952
|
||||||
|
vt 0.375000 0.127048
|
||||||
|
vt 0.875000 0.622952
|
||||||
|
vt 0.625000 0.127048
|
||||||
|
vt 0.375000 0.622952
|
||||||
|
vt 0.625000 0.622952
|
||||||
|
vt 0.643236 0.622952
|
||||||
|
vt 0.356764 0.622952
|
||||||
|
vt 0.182136 0.622952
|
||||||
|
vt 0.817864 0.622952
|
||||||
|
vt 0.752288 0.622952
|
||||||
|
vt 0.696414 0.622952
|
||||||
|
vt 0.571865 0.127048
|
||||||
|
vt 0.571865 0.622952
|
||||||
|
vt 0.182136 0.622952
|
||||||
|
vt 0.875000 0.567503
|
||||||
|
vt 0.625000 0.182497
|
||||||
|
vt 0.375000 0.567503
|
||||||
|
vt 0.571865 0.182497
|
||||||
|
vt 0.375000 0.182497
|
||||||
|
vt 0.625000 0.567503
|
||||||
|
vt 0.643236 0.567503
|
||||||
|
vt 0.356764 0.567503
|
||||||
|
vt 0.817864 0.567503
|
||||||
|
vt 0.752288 0.567503
|
||||||
|
vt 0.696414 0.567503
|
||||||
|
vt 0.571865 0.567503
|
||||||
|
vt 0.182136 0.567503
|
||||||
|
vt 0.476468 0.250000
|
||||||
|
vt 0.476468 0.500000
|
||||||
|
vt 0.476468 0.750000
|
||||||
|
vt 0.476468 0.768236
|
||||||
|
vt 0.476468 0.481764
|
||||||
|
vt 0.476468 0.307136
|
||||||
|
vt 0.476468 0.942864
|
||||||
|
vt 0.476468 0.512055
|
||||||
|
vt 0.476468 0.733848
|
||||||
|
vt 0.476468 0.016152
|
||||||
|
vt 0.476468 0.237945
|
||||||
|
vt 0.476468 0.877288
|
||||||
|
vt 0.414786 0.434393
|
||||||
|
vt 0.476468 0.372712
|
||||||
|
vt 0.476468 0.821414
|
||||||
|
vt 0.441862 0.463192
|
||||||
|
vt 0.476468 0.428586
|
||||||
|
vt 0.476468 1.000000
|
||||||
|
vt 0.476468 0.000000
|
||||||
|
vt 0.247712 0.512055
|
||||||
|
vt 0.303586 0.512055
|
||||||
|
vt 0.182136 0.622952
|
||||||
|
vt 0.476468 0.622952
|
||||||
|
vt 0.476468 0.127048
|
||||||
|
vt 0.476468 0.567503
|
||||||
|
vt 0.182136 0.567503
|
||||||
|
vt 0.476468 0.182497
|
||||||
|
s 0
|
||||||
|
usemtl None.001
|
||||||
|
f 60/87/1 20/37/1 4/9/1 50/77/1
|
||||||
|
f 54/81/2 10/17/2 8/14/2 51/78/2
|
||||||
|
f 58/85/3 24/42/3 6/12/3 52/79/3
|
||||||
|
f 56/83/4 14/26/4 2/4/4 49/76/4
|
||||||
|
f 28/46/5 21/39/5 5/11/5 11/19/5
|
||||||
|
f 32/50/6 19/35/6 2/5/6 14/25/6
|
||||||
|
f 24/42/6 26/44/6 12/21/6 6/12/6
|
||||||
|
f 48/74/5 28/46/5 11/19/5 42/65/5
|
||||||
|
f 52/79/4 6/12/4 12/22/4 53/80/4
|
||||||
|
f 64/91/2 41/64/2 10/17/2 54/81/2
|
||||||
|
f 50/77/2 4/9/2 15/28/2 55/82/2
|
||||||
|
f 18/33/5 30/48/5 16/29/5 1/1/5
|
||||||
|
f 38/60/6 32/50/6 14/25/6 36/58/6
|
||||||
|
f 61/88/4 36/57/4 14/26/4 56/83/4
|
||||||
|
f 33/51/6 15/27/6 31/49/6 37/59/6
|
||||||
|
f 76/104/6 75/103/6 32/50/6 38/60/6
|
||||||
|
f 3/7/5 13/23/5 29/47/5 17/31/5
|
||||||
|
f 68/94/5 74/102/5 30/48/5 18/33/5
|
||||||
|
f 45/69/5 9/15/5 27/45/5 47/73/5
|
||||||
|
f 8/14/6 10/18/6 25/43/6 23/41/6
|
||||||
|
f 71/99/6 72/100/6 26/44/6 24/42/6
|
||||||
|
f 15/27/6 4/10/6 20/38/6 31/49/6
|
||||||
|
f 75/103/6 69/96/6 19/35/6 32/50/6
|
||||||
|
f 9/15/5 7/13/5 22/40/5 27/45/5
|
||||||
|
f 73/101/5 70/98/5 21/39/5 28/46/5
|
||||||
|
f 51/78/3 8/14/3 23/41/3 57/84/3
|
||||||
|
f 79/107/3 71/99/3 24/42/3 58/85/3
|
||||||
|
f 49/75/1 2/6/1 19/36/1 59/86/1
|
||||||
|
f 83/112/1 81/110/1 20/37/1 60/87/1
|
||||||
|
f 13/23/5 35/55/5 39/61/5 29/47/5
|
||||||
|
f 77/105/6 76/104/6 38/60/6 44/68/6
|
||||||
|
f 41/63/6 33/51/6 37/59/6 43/67/6
|
||||||
|
f 63/90/4 46/72/4 36/57/4 61/88/4
|
||||||
|
f 44/68/6 38/60/6 36/58/6 46/71/6
|
||||||
|
f 55/82/2 15/28/2 33/52/2 62/89/2
|
||||||
|
f 30/48/5 40/62/5 34/53/5 16/29/5
|
||||||
|
f 26/44/6 44/68/6 46/71/6 12/21/6
|
||||||
|
f 53/80/4 12/22/4 46/72/4 63/90/4
|
||||||
|
f 10/18/6 41/63/6 43/67/6 25/43/6
|
||||||
|
f 72/100/6 77/105/6 44/68/6 26/44/6
|
||||||
|
f 62/89/2 33/52/2 41/64/2 64/91/2
|
||||||
|
f 40/62/5 48/74/5 42/65/5 34/53/5
|
||||||
|
f 66/92/5 62/89/5 64/91/5 67/93/5
|
||||||
|
f 97/125/4 53/80/4 63/90/4 108/136/4
|
||||||
|
f 99/127/2 55/82/2 62/89/2 107/135/2
|
||||||
|
f 108/136/4 63/90/4 61/88/4 106/133/4
|
||||||
|
f 118/148/1 83/112/1 60/87/1 104/132/1
|
||||||
|
f 110/140/1 49/75/1 59/86/1 103/131/1
|
||||||
|
f 114/144/3 79/107/3 58/85/3 102/130/3
|
||||||
|
f 95/123/3 51/78/3 57/84/3 101/129/3
|
||||||
|
f 106/133/4 61/88/4 56/83/4 100/128/4
|
||||||
|
f 94/122/2 50/77/2 55/82/2 99/127/2
|
||||||
|
f 109/138/2 64/91/2 54/81/2 98/126/2
|
||||||
|
f 96/124/4 52/79/4 53/80/4 97/125/4
|
||||||
|
f 100/128/4 56/83/4 49/76/4 110/139/4
|
||||||
|
f 102/130/3 58/85/3 52/79/3 96/124/3
|
||||||
|
f 98/126/2 54/81/2 51/78/2 95/123/2
|
||||||
|
f 104/132/1 60/87/1 50/77/1 94/122/1
|
||||||
|
f 112/142/1 109/137/1 45/69/1 47/73/1
|
||||||
|
f 111/141/3 39/61/3 35/55/3 107/134/3
|
||||||
|
f 116/146/3 92/120/3 79/107/3 114/144/3
|
||||||
|
f 103/131/1 59/86/1 78/106/1 115/145/1
|
||||||
|
f 86/115/6 91/119/6 77/105/6 72/100/6
|
||||||
|
f 91/119/6 90/118/6 76/104/6 77/105/6
|
||||||
|
f 59/86/1 19/36/1 69/97/1 78/106/1
|
||||||
|
f 92/120/3 85/114/3 71/99/3 79/107/3
|
||||||
|
f 87/116/5 82/111/5 70/98/5 73/101/5
|
||||||
|
f 89/117/6 81/109/6 69/96/6 75/103/6
|
||||||
|
f 85/114/6 86/115/6 72/100/6 71/99/6
|
||||||
|
f 90/118/6 89/117/6 75/103/6 76/104/6
|
||||||
|
f 37/59/6 31/49/6 89/117/6 90/118/6
|
||||||
|
f 23/41/6 25/43/6 86/115/6 85/114/6
|
||||||
|
f 31/49/6 20/38/6 81/109/6 89/117/6
|
||||||
|
f 27/45/5 22/40/5 82/111/5 87/116/5
|
||||||
|
f 57/84/3 23/41/3 85/114/3 92/120/3
|
||||||
|
f 43/67/6 37/59/6 90/118/6 91/119/6
|
||||||
|
f 25/43/6 43/67/6 91/119/6 86/115/6
|
||||||
|
f 101/129/3 57/84/3 92/120/3 116/146/3
|
||||||
|
f 78/106/1 69/97/1 81/110/1 83/112/1
|
||||||
|
f 68/95/1 115/145/1 118/148/1 84/113/1
|
||||||
|
f 22/40/3 101/129/3 116/146/3 82/111/3
|
||||||
|
f 18/34/1 103/131/1 115/145/1 68/95/1
|
||||||
|
f 82/111/3 116/146/3 114/144/3 70/98/3
|
||||||
|
f 66/92/3 111/141/3 107/134/3 62/89/3
|
||||||
|
f 67/93/1 64/91/1 109/137/1 112/142/1
|
||||||
|
f 17/32/1 104/132/1 94/122/1 3/8/1
|
||||||
|
f 9/16/2 98/126/2 95/123/2 7/13/2
|
||||||
|
f 21/39/3 102/130/3 96/124/3 5/11/3
|
||||||
|
f 16/30/4 100/128/4 110/139/4 1/2/4
|
||||||
|
f 5/11/4 96/124/4 97/125/4 11/20/4
|
||||||
|
f 45/70/2 109/138/2 98/126/2 9/16/2
|
||||||
|
f 3/8/2 94/122/2 99/127/2 13/24/2
|
||||||
|
f 34/54/4 106/133/4 100/128/4 16/30/4
|
||||||
|
f 7/13/3 95/123/3 101/129/3 22/40/3
|
||||||
|
f 70/98/3 114/144/3 102/130/3 21/39/3
|
||||||
|
f 1/3/1 110/140/1 103/131/1 18/34/1
|
||||||
|
f 84/113/1 118/148/1 104/132/1 17/32/1
|
||||||
|
f 42/66/4 108/136/4 106/133/4 34/54/4
|
||||||
|
f 13/24/2 99/127/2 107/135/2 35/56/2
|
||||||
|
f 11/20/4 97/125/4 108/136/4 42/66/4
|
||||||
|
f 115/145/6 113/143/6 117/147/6 118/148/6
|
||||||
|
f 117/147/4 93/121/4 83/112/4 118/148/4
|
||||||
|
f 93/121/5 80/108/5 78/106/5 83/112/5
|
||||||
|
f 113/143/2 115/145/2 78/106/2 80/108/2
|
||||||
|
l 68 65
|
||||||
|
l 18 88
|
||||||
|
l 74 105
|
||||||
|
l 74 113
|
@ -302,6 +302,7 @@ void main()
|
|||||||
|
|
||||||
|
|
||||||
outColor = vec4(vec3(1.0) - exp(-ilumination*exposition),1);
|
outColor = vec4(vec3(1.0) - exp(-ilumination*exposition),1);
|
||||||
|
|
||||||
//outColor = vec4(roughness,metallic,0,1);
|
//outColor = vec4(roughness,metallic,0,1);
|
||||||
//outColor = vec4(test;
|
//outColor = vec4(test;
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,170 @@
|
|||||||
#version 430 core
|
#version 430 core
|
||||||
|
|
||||||
float AMBIENT = 0.1;
|
//float AMBIENT = 0.1;
|
||||||
|
//
|
||||||
|
//uniform vec3 color;
|
||||||
|
//uniform vec3 lightPos;
|
||||||
|
//uniform sampler2D colorTexture;
|
||||||
|
//
|
||||||
|
//in vec3 vecNormal;
|
||||||
|
//in vec3 worldPos;
|
||||||
|
//in vec2 vecTex;
|
||||||
|
//
|
||||||
|
//out vec4 outColor;
|
||||||
|
//void main()
|
||||||
|
//{
|
||||||
|
// vec3 lightDir = normalize(lightPos - worldPos);
|
||||||
|
// vec3 normal = normalize(vecNormal);
|
||||||
|
// vec3 textureColor = texture2D(colorTexture, vecTex).xyz;
|
||||||
|
// float diffuse = max(0, dot(normal, lightDir));
|
||||||
|
// outColor = vec4(textureColor * min(1, AMBIENT + diffuse), 1.0);
|
||||||
|
//}
|
||||||
|
|
||||||
|
float AMBIENT = 0.03;
|
||||||
|
float PI = 3.14;
|
||||||
|
|
||||||
|
uniform sampler2D depthMapSun;
|
||||||
|
|
||||||
|
uniform vec3 cameraPos;
|
||||||
|
|
||||||
uniform vec3 color;
|
uniform vec3 color;
|
||||||
|
|
||||||
|
uniform vec3 sunDir;
|
||||||
|
uniform vec3 sunColor;
|
||||||
|
|
||||||
uniform vec3 lightPos;
|
uniform vec3 lightPos;
|
||||||
|
uniform vec3 lightColor;
|
||||||
|
|
||||||
uniform sampler2D colorTexture;
|
uniform sampler2D colorTexture;
|
||||||
|
in vec2 vecTex;
|
||||||
|
|
||||||
|
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 vecNormal;
|
||||||
in vec3 worldPos;
|
in vec3 worldPos;
|
||||||
in vec2 vecTex;
|
|
||||||
|
|
||||||
out vec4 outColor;
|
out vec4 outColor;
|
||||||
|
|
||||||
|
|
||||||
|
in vec3 viewDirTS;
|
||||||
|
in vec3 lightDirTS;
|
||||||
|
in vec3 spotlightDirTS;
|
||||||
|
in vec3 sunDirTS;
|
||||||
|
|
||||||
|
in vec4 sunSpacePos;
|
||||||
|
|
||||||
|
in vec3 test;
|
||||||
|
uniform float time;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
float calculateShadow() {
|
||||||
|
|
||||||
|
vec4 sunSpacePosNormalized = (0.5 * sunSpacePos / (sunSpacePos.w)) + 0.5;
|
||||||
|
|
||||||
|
float closestDepth = texture2D(depthMapSun, sunSpacePosNormalized.xy).x;//r?
|
||||||
|
|
||||||
|
float diff = (0.001+closestDepth) - sunSpacePosNormalized.z;//sunSpacePosNormalized.z;
|
||||||
|
|
||||||
|
return (0.5*(diff)/abs(diff))+0.5;
|
||||||
|
}
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 lightDir = normalize(lightPos-worldPos);
|
vec3 lightDir = normalize(lightPos-worldPos);
|
||||||
vec3 normal = normalize(vecNormal);
|
vec3 normal = normalize(vecNormal);
|
||||||
vec3 textureColor = texture2D(colorTexture, vecTex).xyz;
|
vec3 textureColor = texture2D(colorTexture, vecTex).xyz;
|
||||||
float diffuse=max(0,dot(normal,lightDir));
|
float diffuse=max(0,dot(normal,lightDir));
|
||||||
outColor = vec4(textureColor*min(1,AMBIENT+diffuse), 1.0);
|
|
||||||
|
vec3 viewDir = normalize(cameraPos-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);
|
||||||
|
ilumination=ilumination+PBRLight(spotlightDir,attenuatedlightColor,normal,viewDir);
|
||||||
|
|
||||||
|
//sun
|
||||||
|
ilumination=ilumination+PBRLight(sunDir, sunColor * calculateShadow(), normal, viewDir);
|
||||||
|
|
||||||
|
//outColor = vec4(textureColor*min(1,AMBIENT+diffuse), 1.0);
|
||||||
|
//outColor = vec4(vec3(1.0) - exp(-ilumination*exposition),1);
|
||||||
|
|
||||||
|
outColor = vec4(textureColor*min(1,AMBIENT+diffuse) - 0.75*exp(-ilumination*exposition),1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,16 +1,52 @@
|
|||||||
#version 430 core
|
#version 430 core
|
||||||
|
|
||||||
|
//layout(location = 0) in vec3 vertexPosition;
|
||||||
|
//layout(location = 1) in vec3 vertexNormal;
|
||||||
|
//layout(location = 2) in vec2 vertexTexCoord;
|
||||||
|
//
|
||||||
|
//uniform mat4 transformation;
|
||||||
|
//uniform mat4 modelMatrix;
|
||||||
|
//
|
||||||
|
//out vec3 vecNormal;
|
||||||
|
//out vec3 worldPos;
|
||||||
|
//out vec2 vecTex;
|
||||||
|
//
|
||||||
|
//void main()
|
||||||
|
//{
|
||||||
|
// worldPos = (modelMatrix * vec4(vertexPosition, 1)).xyz;
|
||||||
|
// vecNormal = (modelMatrix * vec4(vertexNormal, 0)).xyz;
|
||||||
|
// vecTex = vertexTexCoord;
|
||||||
|
// vecTex.y = 1.0 - vecTex.y;
|
||||||
|
// gl_Position = transformation * vec4(vertexPosition, 1.0);
|
||||||
|
//}
|
||||||
|
|
||||||
layout(location = 0) in vec3 vertexPosition;
|
layout(location = 0) in vec3 vertexPosition;
|
||||||
layout(location = 1) in vec3 vertexNormal;
|
layout(location = 1) in vec3 vertexNormal;
|
||||||
layout(location = 2) in vec2 vertexTexCoord;
|
layout(location = 2) in vec2 vertexTexCoord;
|
||||||
|
layout(location = 3) in vec3 vertexTangent;
|
||||||
|
layout(location = 4) in vec3 vertexBitangent;
|
||||||
|
|
||||||
uniform mat4 transformation;
|
uniform mat4 transformation;
|
||||||
uniform mat4 modelMatrix;
|
uniform mat4 modelMatrix;
|
||||||
|
|
||||||
|
uniform mat4 LightVPSun;
|
||||||
|
|
||||||
out vec3 vecNormal;
|
out vec3 vecNormal;
|
||||||
out vec3 worldPos;
|
out vec3 worldPos;
|
||||||
out vec2 vecTex;
|
out vec2 vecTex;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
worldPos = (modelMatrix* vec4(vertexPosition,1)).xyz;
|
worldPos = (modelMatrix* vec4(vertexPosition,1)).xyz;
|
||||||
@ -18,4 +54,19 @@ void main()
|
|||||||
vecTex = vertexTexCoord;
|
vecTex = vertexTexCoord;
|
||||||
vecTex.y = 1.0 - vecTex.y;
|
vecTex.y = 1.0 - vecTex.y;
|
||||||
gl_Position = transformation * vec4(vertexPosition, 1.0);
|
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));
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
sunSpacePos=LightVPSun*modelMatrix*vec4(vertexPosition,1);
|
||||||
|
|
||||||
}
|
}
|
@ -20,21 +20,27 @@
|
|||||||
#include <assimp/postprocess.h>
|
#include <assimp/postprocess.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
const unsigned int SHADOW_WIDTH = 1024, SHADOW_HEIGHT = 1024;
|
const unsigned int SHADOW_WIDTH = 1024, SHADOW_HEIGHT = 1024;
|
||||||
|
|
||||||
int WIDTH = 950, HEIGHT = 950;
|
int WIDTH = 950, HEIGHT = 950;
|
||||||
|
|
||||||
|
struct Vertex {
|
||||||
|
float x, y, z;
|
||||||
|
};
|
||||||
|
|
||||||
namespace texture {
|
namespace texture {
|
||||||
GLuint skybox;
|
GLuint skybox;
|
||||||
GLuint sofa;
|
GLuint sofa;
|
||||||
GLuint floor;
|
GLuint floor;
|
||||||
GLuint wall1;
|
GLuint walls;
|
||||||
GLuint wall2;
|
|
||||||
GLuint wall3;
|
|
||||||
GLuint wall4;
|
|
||||||
GLuint ship;
|
GLuint ship;
|
||||||
GLuint roof;
|
GLuint roof;
|
||||||
GLuint xThing;
|
GLuint xThing;
|
||||||
|
GLuint table;
|
||||||
|
GLuint tvTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace models {
|
namespace models {
|
||||||
@ -45,11 +51,12 @@ namespace models {
|
|||||||
Core::RenderContext tableContext;
|
Core::RenderContext tableContext;
|
||||||
Core::RenderContext doorContext;
|
Core::RenderContext doorContext;
|
||||||
Core::RenderContext doorFrameContext;
|
Core::RenderContext doorFrameContext;
|
||||||
Core::RenderContext drawerContext;
|
//Core::RenderContext drawerContext;
|
||||||
Core::RenderContext tvContext;
|
Core::RenderContext tvContext;
|
||||||
Core::RenderContext xThingContext;
|
Core::RenderContext xThingContext;
|
||||||
Core::RenderContext planeContext;
|
Core::RenderContext planeContext;
|
||||||
Core::RenderContext roomContext;
|
Core::RenderContext roomOutsideContext;
|
||||||
|
Core::RenderContext roomInsideContext;
|
||||||
Core::RenderContext roofContext;
|
Core::RenderContext roofContext;
|
||||||
Core::RenderContext wall1Context;
|
Core::RenderContext wall1Context;
|
||||||
Core::RenderContext wall2Context;
|
Core::RenderContext wall2Context;
|
||||||
@ -243,6 +250,13 @@ glm::mat4 createPerspectiveMatrix()
|
|||||||
return perspectiveMatrix;
|
return perspectiveMatrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void drawObjectDepth(Core::RenderContext context, glm::mat4 viewProjectionMatrix, glm::mat4 modelMatrix) {
|
||||||
|
|
||||||
|
glUniformMatrix4fv(glGetUniformLocation(programDepth, "viewProjectionMatrix"), 1, GL_FALSE, (float*)&viewProjectionMatrix);
|
||||||
|
glUniformMatrix4fv(glGetUniformLocation(programDepth, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix);
|
||||||
|
Core::DrawContext(context);
|
||||||
|
}
|
||||||
|
|
||||||
void drawObjectPBR(Core::RenderContext& context, glm::mat4 modelMatrix, glm::vec3 color, float roughness, float metallic) {
|
void drawObjectPBR(Core::RenderContext& context, glm::mat4 modelMatrix, glm::vec3 color, float roughness, float metallic) {
|
||||||
|
|
||||||
glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix();
|
glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix();
|
||||||
@ -294,51 +308,82 @@ void drawObjectPBR(Core::RenderContext& context, glm::mat4 modelMatrix, glm::vec
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void drawObjectDepth(Core::RenderContext context, glm::mat4 viewProjectionMatrix, glm::mat4 modelMatrix) {
|
|
||||||
|
|
||||||
glUniformMatrix4fv(glGetUniformLocation(programDepth, "viewProjectionMatrix"), 1, GL_FALSE, (float*)&viewProjectionMatrix);
|
|
||||||
glUniformMatrix4fv(glGetUniformLocation(programDepth, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix);
|
|
||||||
Core::DrawContext(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
//TEXTURES
|
|
||||||
//void drawObjectTexture(Core::RenderContext& context, glm::mat4 modelMatrix, GLuint textureID) {
|
//void drawObjectTexture(Core::RenderContext& context, glm::mat4 modelMatrix, GLuint textureID) {
|
||||||
// glUseProgram(programTex);
|
// glUseProgram(programTex);
|
||||||
// glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix();
|
// glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix();
|
||||||
// glm::mat4 transformation = viewProjectionMatrix * modelMatrix;
|
// glm::mat4 transformation = viewProjectionMatrix * modelMatrix;
|
||||||
// glUniformMatrix4fv(glGetUniformLocation(programTex, "transformation"), 1, GL_FALSE, (float*)&transformation);
|
// glUniformMatrix4fv(glGetUniformLocation(programTex, "transformation"), 1, GL_FALSE, (float*)&transformation);
|
||||||
// glUniformMatrix4fv(glGetUniformLocation(programTex, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix);
|
// glUniformMatrix4fv(glGetUniformLocation(programTex, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix);
|
||||||
// //glUniform3f(glGetUniformLocation(programTex, "lightPos"), 0, 0, 0);
|
//
|
||||||
|
// glUniform1f(glGetUniformLocation(programTex, "exposition"), exposition);
|
||||||
|
//
|
||||||
|
// //glUniform1f(glGetUniformLocation(program, "roughness"), roughness);
|
||||||
|
// //glUniform1f(glGetUniformLocation(program, "metallic"), metallic);
|
||||||
|
//
|
||||||
|
// //glUniform3f(glGetUniformLocation(program, "color"), color.x, color.y, color.z);
|
||||||
|
//
|
||||||
|
// glUniform3f(glGetUniformLocation(programTex, "cameraPos"), cameraPos.x, cameraPos.y, cameraPos.z);
|
||||||
|
//
|
||||||
|
// glUniform3f(glGetUniformLocation(programTex, "sunDir"), sunDir.x, sunDir.y, sunDir.z);
|
||||||
|
// glUniform3f(glGetUniformLocation(programTex, "sunColor"), sunColor.x, sunColor.y, sunColor.z);
|
||||||
|
//
|
||||||
|
// glUniform3f(glGetUniformLocation(programTex, "lightPos"), pointlightPos.x, pointlightPos.y, pointlightPos.z);
|
||||||
|
// glUniform3f(glGetUniformLocation(programTex, "lightColor"), pointlightColor.x, pointlightColor.y, pointlightColor.z);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// //lasers light
|
||||||
|
// for (int i = 0; i < lasers.size(); i++) {
|
||||||
|
// std::string stringLaserPos = "laserLightPos";
|
||||||
|
// stringLaserPos += std::to_string(i);
|
||||||
|
// if (lasers[i].isLaserFly()) {
|
||||||
|
// glUniform3f(glGetUniformLocation(programTex, "laserLightColor"), laserLightColor.x, laserLightColor.y, laserLightColor.z);
|
||||||
|
// glUniform3f(glGetUniformLocation(programTex, stringLaserPos.c_str()), lasersLightPos[i].x, lasersLightPos[i].y, lasersLightPos[i].z);
|
||||||
|
// /*glUniform3fv(glGetUniformLocation(program, "lasersLightPos"), 3, &lasersLightPos[i][0]);
|
||||||
|
// glUniform1i(glGetUniformLocation(program, "lasersLightPosArrayIndex"), i);*/
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// glUniform3f(glGetUniformLocation(programTex, "spotlightConeDir"), spotlightConeDir.x, spotlightConeDir.y, spotlightConeDir.z);
|
||||||
|
// glUniform3f(glGetUniformLocation(programTex, "spotlightPos"), spotlightPos.x, spotlightPos.y, spotlightPos.z);
|
||||||
|
// glUniform3f(glGetUniformLocation(programTex, "spotlightColor"), spotlightColor.x, spotlightColor.y, spotlightColor.z);
|
||||||
|
// glUniform1f(glGetUniformLocation(programTex, "spotlightPhi"), spotlightPhi);
|
||||||
|
//
|
||||||
|
// //For shadows
|
||||||
|
// glm::mat4 lightVPSun = glm::ortho(-3.f, 2.3f, -1.3f, 3.f, -1.0f, 40.0f) * glm::lookAt(sunPos, sunPos - sunDir, glm::vec3(0, 1, 0));
|
||||||
|
// glUniformMatrix4fv(glGetUniformLocation(programTex, "LightVPSun"), 1, GL_FALSE, (float*)&lightVPSun);
|
||||||
|
// glUniform1i(glGetUniformLocation(programTex, "depthMapSun"), 2);
|
||||||
|
// glActiveTexture(GL_TEXTURE0 + 2);
|
||||||
|
// glBindTexture(GL_TEXTURE_2D, depthMapSun);
|
||||||
|
//
|
||||||
// Core::SetActiveTexture(textureID, "colorTexture", programTex, 0);
|
// Core::SetActiveTexture(textureID, "colorTexture", programTex, 0);
|
||||||
// Core::DrawContext(context);
|
// Core::DrawContext(context);
|
||||||
// glUseProgram(0);
|
// glUseProgram(0);
|
||||||
//
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
void drawObjectTexture(Core::RenderContext& context, glm::mat4 modelMatrix, GLuint textureID) {
|
|
||||||
|
|
||||||
|
|
||||||
|
void drawObjectTexture(Core::RenderContext& context, glm::mat4 modelMatrix, GLuint textureID, glm::vec3 color, float roughness, float metallic) {
|
||||||
glUseProgram(programTex);
|
glUseProgram(programTex);
|
||||||
glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix();
|
glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix();
|
||||||
glm::mat4 transformation = viewProjectionMatrix * modelMatrix;
|
glm::mat4 transformation = viewProjectionMatrix * modelMatrix;
|
||||||
/*glm::mat4 transformation = modelMatrix;*/
|
|
||||||
glUniformMatrix4fv(glGetUniformLocation(programTex, "transformation"), 1, GL_FALSE, (float*)&transformation);
|
glUniformMatrix4fv(glGetUniformLocation(programTex, "transformation"), 1, GL_FALSE, (float*)&transformation);
|
||||||
glUniformMatrix4fv(glGetUniformLocation(programTex, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix);
|
glUniformMatrix4fv(glGetUniformLocation(programTex, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix);
|
||||||
//glUniform3f(glGetUniformLocation(programTex, "lightPos"), pointlightPos.x, pointlightPos.y, pointlightPos.z);
|
|
||||||
|
|
||||||
|
glUniform1f(glGetUniformLocation(programTex, "roughness"), roughness);
|
||||||
|
glUniform1f(glGetUniformLocation(programTex, "metallic"), metallic);
|
||||||
|
glUniform3f(glGetUniformLocation(programTex, "color"), color.x, color.y, color.z);
|
||||||
|
|
||||||
glUniform1f(glGetUniformLocation(program, "exposition"), exposition);
|
glUniform1f(glGetUniformLocation(programTex, "exposition"), exposition);
|
||||||
|
|
||||||
//glUniform1f(glGetUniformLocation(program, "roughness"), roughness);
|
glUniform3f(glGetUniformLocation(programTex, "cameraPos"), cameraPos.x, cameraPos.y, cameraPos.z);
|
||||||
//glUniform1f(glGetUniformLocation(program, "metallic"), metallic);
|
|
||||||
|
|
||||||
//glUniform3f(glGetUniformLocation(program, "color"), color.x, color.y, color.z);
|
glUniform3f(glGetUniformLocation(programTex, "sunDir"), sunDir.x, sunDir.y, sunDir.z);
|
||||||
|
glUniform3f(glGetUniformLocation(programTex, "sunColor"), sunColor.x, sunColor.y, sunColor.z);
|
||||||
|
|
||||||
glUniform3f(glGetUniformLocation(program, "cameraPos"), cameraPos.x, cameraPos.y, cameraPos.z);
|
glUniform3f(glGetUniformLocation(programTex, "lightPos"), pointlightPos.x, pointlightPos.y, pointlightPos.z);
|
||||||
|
glUniform3f(glGetUniformLocation(programTex, "lightColor"), pointlightColor.x, pointlightColor.y, pointlightColor.z);
|
||||||
glUniform3f(glGetUniformLocation(program, "sunDir"), sunDir.x, sunDir.y, sunDir.z);
|
|
||||||
glUniform3f(glGetUniformLocation(program, "sunColor"), sunColor.x, sunColor.y, sunColor.z);
|
|
||||||
|
|
||||||
glUniform3f(glGetUniformLocation(program, "lightPos"), pointlightPos.x, pointlightPos.y, pointlightPos.z);
|
|
||||||
glUniform3f(glGetUniformLocation(program, "lightColor"), pointlightColor.x, pointlightColor.y, pointlightColor.z);
|
|
||||||
|
|
||||||
|
|
||||||
//lasers light
|
//lasers light
|
||||||
@ -346,22 +391,22 @@ void drawObjectTexture(Core::RenderContext& context, glm::mat4 modelMatrix, GLui
|
|||||||
std::string stringLaserPos = "laserLightPos";
|
std::string stringLaserPos = "laserLightPos";
|
||||||
stringLaserPos += std::to_string(i);
|
stringLaserPos += std::to_string(i);
|
||||||
if (lasers[i].isLaserFly()) {
|
if (lasers[i].isLaserFly()) {
|
||||||
glUniform3f(glGetUniformLocation(program, "laserLightColor"), laserLightColor.x, laserLightColor.y, laserLightColor.z);
|
glUniform3f(glGetUniformLocation(programTex, "laserLightColor"), laserLightColor.x, laserLightColor.y, laserLightColor.z);
|
||||||
glUniform3f(glGetUniformLocation(program, stringLaserPos.c_str()), lasersLightPos[i].x, lasersLightPos[i].y, lasersLightPos[i].z);
|
glUniform3f(glGetUniformLocation(programTex, stringLaserPos.c_str()), lasersLightPos[i].x, lasersLightPos[i].y, lasersLightPos[i].z);
|
||||||
/*glUniform3fv(glGetUniformLocation(program, "lasersLightPos"), 3, &lasersLightPos[i][0]);
|
/*glUniform3fv(glGetUniformLocation(program, "lasersLightPos"), 3, &lasersLightPos[i][0]);
|
||||||
glUniform1i(glGetUniformLocation(program, "lasersLightPosArrayIndex"), i);*/
|
glUniform1i(glGetUniformLocation(program, "lasersLightPosArrayIndex"), i);*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
glUniform3f(glGetUniformLocation(program, "spotlightConeDir"), spotlightConeDir.x, spotlightConeDir.y, spotlightConeDir.z);
|
glUniform3f(glGetUniformLocation(programTex, "spotlightConeDir"), spotlightConeDir.x, spotlightConeDir.y, spotlightConeDir.z);
|
||||||
glUniform3f(glGetUniformLocation(program, "spotlightPos"), spotlightPos.x, spotlightPos.y, spotlightPos.z);
|
glUniform3f(glGetUniformLocation(programTex, "spotlightPos"), spotlightPos.x, spotlightPos.y, spotlightPos.z);
|
||||||
glUniform3f(glGetUniformLocation(program, "spotlightColor"), spotlightColor.x, spotlightColor.y, spotlightColor.z);
|
glUniform3f(glGetUniformLocation(programTex, "spotlightColor"), spotlightColor.x, spotlightColor.y, spotlightColor.z);
|
||||||
glUniform1f(glGetUniformLocation(program, "spotlightPhi"), spotlightPhi);
|
glUniform1f(glGetUniformLocation(programTex, "spotlightPhi"), spotlightPhi);
|
||||||
|
|
||||||
//For shadows
|
//For shadows
|
||||||
glm::mat4 lightVPSun = glm::ortho(-3.f, 2.3f, -1.3f, 3.f, -1.0f, 40.0f) * glm::lookAt(sunPos, sunPos - sunDir, glm::vec3(0, 1, 0));
|
glm::mat4 lightVPSun = glm::ortho(-3.f, 2.3f, -1.3f, 3.f, -1.0f, 40.0f) * glm::lookAt(sunPos, sunPos - sunDir, glm::vec3(0, 1, 0));
|
||||||
glUniformMatrix4fv(glGetUniformLocation(program, "LightVPSun"), 1, GL_FALSE, (float*)&lightVPSun);
|
glUniformMatrix4fv(glGetUniformLocation(programTex, "LightVPSun"), 1, GL_FALSE, (float*)&lightVPSun);
|
||||||
glUniform1i(glGetUniformLocation(program, "depthMapSun"), 2);
|
glUniform1i(glGetUniformLocation(programTex, "depthMapSun"), 2);
|
||||||
glActiveTexture(GL_TEXTURE0 + 2);
|
glActiveTexture(GL_TEXTURE0 + 2);
|
||||||
glBindTexture(GL_TEXTURE_2D, depthMapSun);
|
glBindTexture(GL_TEXTURE_2D, depthMapSun);
|
||||||
|
|
||||||
@ -398,11 +443,11 @@ void renderShadowapSun(GLuint depthMapFBO, glm::mat4 lightVP) {
|
|||||||
drawObjectDepth(models::tableContext, lightVP, glm::mat4());
|
drawObjectDepth(models::tableContext, lightVP, glm::mat4());
|
||||||
drawObjectDepth(models::doorContext, lightVP, glm::mat4());
|
drawObjectDepth(models::doorContext, lightVP, glm::mat4());
|
||||||
drawObjectDepth(models::doorFrameContext, lightVP, glm::mat4());
|
drawObjectDepth(models::doorFrameContext, lightVP, glm::mat4());
|
||||||
drawObjectDepth(models::drawerContext, lightVP, glm::mat4());
|
|
||||||
drawObjectDepth(models::tvContext, lightVP, glm::mat4());
|
drawObjectDepth(models::tvContext, lightVP, glm::mat4());
|
||||||
drawObjectDepth(models::xThingContext, lightVP, glm::mat4());
|
drawObjectDepth(models::xThingContext, lightVP, glm::mat4());
|
||||||
drawObjectDepth(models::planeContext, lightVP, glm::mat4());
|
drawObjectDepth(models::planeContext, lightVP, glm::mat4());
|
||||||
drawObjectDepth(models::roomContext, lightVP, glm::mat4());
|
drawObjectDepth(models::roomInsideContext, lightVP, glm::mat4());
|
||||||
|
drawObjectDepth(models::roomOutsideContext, lightVP, glm::mat4());
|
||||||
drawObjectDepth(models::windowContext, lightVP, glm::mat4());
|
drawObjectDepth(models::windowContext, lightVP, glm::mat4());
|
||||||
drawObjectDepth(models::sofaContext, lightVP, glm::mat4());
|
drawObjectDepth(models::sofaContext, lightVP, glm::mat4());
|
||||||
drawObjectDepth(models::booksContext, lightVP, glm::mat4());
|
drawObjectDepth(models::booksContext, lightVP, glm::mat4());
|
||||||
@ -614,29 +659,29 @@ void renderScene(GLFWwindow* window)
|
|||||||
drawObjectPBR(models::vase2Context, glm::mat4(), glm::vec3(0.4f, 0.2f, 0.1f), 0.2f, 0.0f);
|
drawObjectPBR(models::vase2Context, glm::mat4(), glm::vec3(0.4f, 0.2f, 0.1f), 0.2f, 0.0f);
|
||||||
|
|
||||||
drawObjectPBR(models::tvTableContext, glm::mat4(), glm::vec3(0.4f, 0.4f, 0.4f), 0.4f, 0.0f);
|
drawObjectPBR(models::tvTableContext, glm::mat4(), glm::vec3(0.4f, 0.4f, 0.4f), 0.4f, 0.0f);
|
||||||
drawObjectPBR(models::tableContext, glm::mat4(), glm::vec3(0.428691f, 0.08022f, 0.036889f), 0.2f, 0.0f);
|
|
||||||
drawObjectPBR(models::doorContext, glm::mat4()/*glm::rotate(glm::mat4(), time * glm::radians(90.0f), glm::vec3(1.0f, 0.0f, 0.0f))*/, glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
drawObjectPBR(models::doorContext, glm::mat4()/*glm::rotate(glm::mat4(), time * glm::radians(90.0f), glm::vec3(1.0f, 0.0f, 0.0f))*/, glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f);
|
||||||
drawObjectPBR(models::doorFrameContext, glm::mat4(), glm::vec3(0.45f, 0.120f, 0.057f), 0.26f, 0.0f);
|
drawObjectPBR(models::doorFrameContext, glm::mat4(), glm::vec3(0.45f, 0.120f, 0.057f), 0.26f, 0.0f);
|
||||||
drawObjectPBR(models::drawerContext, glm::mat4(), glm::vec3(0.428691f, 0.08022f, 0.036889f), 0.2f, 0.0f);
|
|
||||||
|
//drawObjectPBR(models::roomOutsideContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f);
|
||||||
drawObjectPBR(models::tvContext, glm::mat4(), glm::vec3(1.f, 1.f, 1.f), 0.5f, 1.0f);
|
drawObjectPBR(models::tvContext, glm::mat4(), glm::vec3(1.f, 1.f, 1.f), 0.5f, 1.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);
|
||||||
|
|
||||||
//drawObjectPBR(models::sofaContext, glm::mat4(), glm::vec3(0.620f, 0.313f, 0.131f), 0.2f, 0.0f);
|
//drawObjectPBR(models::sofaContext, glm::mat4(), glm::vec3(0.620f, 0.313f, 0.131f), 0.2f, 0.0f);
|
||||||
//drawObjectPBR(models::xThingContext, glm::mat4(), glm::vec3(0.10039f, 0.018356f, 0.001935f), 0.1f, 0.0f);
|
//drawObjectPBR(models::xThingContext, 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, 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::tableContext, glm::mat4(), glm::vec3(0.428691f, 0.08022f, 0.036889f), 0.2f, 0.0f);
|
||||||
|
|
||||||
|
|
||||||
//drawObjectPBR(models::roofContext, glm::mat4(), glm::vec3(0.0f, 0.0f, 0.0f), 0.0f, 0.0f);
|
//drawObjectPBR(models::roofContext, glm::mat4(), glm::vec3(0.0f, 0.0f, 0.0f), 0.0f, 0.0f);
|
||||||
|
|
||||||
drawObjectTexture(models::planeContext, glm::mat4(), texture::floor);
|
drawObjectTexture(models::tableContext, glm::mat4(), texture::table, glm::vec3(0.9f, 0.9f, 0.9f), 0.2f, 0.0f);
|
||||||
drawObjectTexture(models::xThingContext, glm::mat4(), texture::xThing);
|
drawObjectTexture(models::planeContext, glm::mat4(), texture::floor, glm::vec3(0.9f, 0.9f, 0.9f), 0.2f, 0.0f);
|
||||||
drawObjectTexture(models::sofaContext, glm::mat4(), texture::sofa);
|
drawObjectTexture(models::xThingContext, glm::mat4(), texture::xThing, glm::vec3(0.9f, 0.9f, 0.9f), 0.1f, 0.0f);
|
||||||
drawObjectTexture(models::roofContext, glm::mat4(), texture::roof);
|
drawObjectTexture(models::sofaContext, glm::mat4(), texture::sofa, glm::vec3(0.9f, 0.9f, 0.9f), 0.2f, 0.0f);
|
||||||
drawObjectTexture(models::roomContext, glm::mat4(), texture::wall1);
|
drawObjectTexture(models::roofContext, glm::mat4(), texture::roof, glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f);
|
||||||
|
drawObjectTexture(models::roomInsideContext, glm::mat4(), texture::walls, glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f);
|
||||||
|
|
||||||
//drawObjectTexture(models::wall1Context, glm::mat4(), texture::wall1);
|
|
||||||
//drawObjectTexture(models::wall2Context, glm::mat4(), texture::wall2);
|
|
||||||
//drawObjectTexture(models::wall3Context, glm::mat4(), texture::wall3);
|
|
||||||
//drawObjectTexture(models::wall4Context, glm::mat4(), texture::wall4);
|
|
||||||
|
|
||||||
|
|
||||||
glm::vec3 spaceshipSide = glm::normalize(glm::cross(spaceShip.getSpaceShipDir(), glm::vec3(0.f, 1.f, 0.f)));
|
glm::vec3 spaceshipSide = glm::normalize(glm::cross(spaceShip.getSpaceShipDir(), glm::vec3(0.f, 1.f, 0.f)));
|
||||||
@ -648,27 +693,7 @@ void renderScene(GLFWwindow* window)
|
|||||||
0.,0.,0.,1.,
|
0.,0.,0.,1.,
|
||||||
});
|
});
|
||||||
|
|
||||||
drawObjectTexture(shipContext,
|
drawObjectTexture(shipContext,glm::translate(spaceShip.getSpaceShipPos()) * specshipCameraRotrationMatrix * glm::eulerAngleY(glm::pi<float>()),texture::ship, glm::vec3(0.9f, 0.9f, 0.9f), 0.2f, 0.0f);
|
||||||
glm::translate(spaceShip.getSpaceShipPos()) * specshipCameraRotrationMatrix * glm::eulerAngleY(glm::pi<float>()) /** glm::scale(glm::vec3(0.015f))*/,
|
|
||||||
texture::ship);
|
|
||||||
|
|
||||||
|
|
||||||
/*drawObjectPBR(shipContext,
|
|
||||||
glm::translate(spaceShip.getSpaceShipPos()) * specshipCameraRotrationMatrix * glm::eulerAngleY(glm::pi<float>()),
|
|
||||||
glm::vec3(0.3, 0.3, 0.5),
|
|
||||||
0.2, 1.0
|
|
||||||
);*/
|
|
||||||
|
|
||||||
/*drawObjectTexture(shipContext,
|
|
||||||
glm::translate(spaceShip.getSpaceShipPos()) * specshipCameraRotrationMatrix * glm::eulerAngleY(glm::pi<float>()) * glm::scale(glm::vec3(0.015f)),
|
|
||||||
texture::floor);*/
|
|
||||||
|
|
||||||
/*drawObjectTexture(models::sofaContext,
|
|
||||||
glm::mat4(),
|
|
||||||
texture::sofa
|
|
||||||
);*/
|
|
||||||
/*Core::SetActiveTexture(texture::floor, "colorTexture", programTex, 0);
|
|
||||||
drawObjectTexture(models::planeContext, glm::mat4(), texture::floor);*/
|
|
||||||
|
|
||||||
|
|
||||||
enemyTime = time;
|
enemyTime = time;
|
||||||
@ -856,11 +881,11 @@ void init(GLFWwindow* window)
|
|||||||
loadModelToContext("./models/vase1.obj", models::vase1Context);
|
loadModelToContext("./models/vase1.obj", models::vase1Context);
|
||||||
loadModelToContext("./models/vase2.obj", models::vase2Context);
|
loadModelToContext("./models/vase2.obj", models::vase2Context);
|
||||||
|
|
||||||
loadModelToContext("./models/table.obj", models::drawerContext);
|
|
||||||
loadModelToContext("./models/TV.obj", models::tvContext);
|
loadModelToContext("./models/TV.obj", models::tvContext);
|
||||||
loadModelToContext("./models/x.obj", models::xThingContext);
|
loadModelToContext("./models/x.obj", models::xThingContext);
|
||||||
loadModelToContext("./models/plane.obj", models::planeContext);
|
loadModelToContext("./models/plane.obj", models::planeContext);
|
||||||
loadModelToContext("./models/room.obj", models::roomContext);
|
loadModelToContext("./models/room.obj", models::roomInsideContext);
|
||||||
|
loadModelToContext("./models/roomOutside.obj", models::roomOutsideContext);
|
||||||
loadModelToContext("./models/roof.obj", models::roofContext);
|
loadModelToContext("./models/roof.obj", models::roofContext);
|
||||||
loadModelToContext("./models/wall1.obj", models::wall1Context);
|
loadModelToContext("./models/wall1.obj", models::wall1Context);
|
||||||
loadModelToContext("./models/wall2.obj", models::wall2Context);
|
loadModelToContext("./models/wall2.obj", models::wall2Context);
|
||||||
@ -871,16 +896,15 @@ void init(GLFWwindow* window)
|
|||||||
loadModelToContext("./models/window.obj", models::windowContext);
|
loadModelToContext("./models/window.obj", models::windowContext);
|
||||||
loadModelToContext("./models/test.obj", models::testContext);
|
loadModelToContext("./models/test.obj", models::testContext);
|
||||||
|
|
||||||
texture::sofa = Core::LoadTexture("textures/sofa.jpg");
|
texture::sofa = Core::LoadTexture("textures/sofa1.jpg");
|
||||||
texture::xThing = Core::LoadTexture("textures/xThing.png");
|
texture::xThing = Core::LoadTexture("textures/xThing.png");
|
||||||
|
|
||||||
|
texture::table = Core::LoadTexture("textures/coffeTable.jpg");
|
||||||
|
|
||||||
texture::floor = Core::LoadTexture("textures/floor.jpg");
|
texture::floor = Core::LoadTexture("textures/floor.jpg");
|
||||||
texture::wall1 = Core::LoadTexture("textures/wall.jpg");
|
texture::walls = Core::LoadTexture("textures/123.jpg");
|
||||||
texture::wall2 = Core::LoadTexture("textures/wall.jpg");
|
|
||||||
texture::wall3 = Core::LoadTexture("textures/wall.jpg");
|
|
||||||
texture::wall4 = Core::LoadTexture("textures/wall.jpg");
|
|
||||||
texture::ship = Core::LoadTexture("textures/ship.jpg");
|
texture::ship = Core::LoadTexture("textures/ship.jpg");
|
||||||
texture::roof = Core::LoadTexture("textures/wall.jpg");
|
texture::roof = Core::LoadTexture("textures/roof.jpg");
|
||||||
|
|
||||||
texture::skybox = LoadSkybox(new char* [6]{ "skybox/posx.jpg", "skybox/negx.jpg", "skybox/posy.jpg","skybox/negy.jpg", "skybox/posz.jpg", "skybox/negz.jpg" });
|
texture::skybox = LoadSkybox(new char* [6]{ "skybox/posx.jpg", "skybox/negx.jpg", "skybox/posy.jpg","skybox/negy.jpg", "skybox/posz.jpg", "skybox/negz.jpg" });
|
||||||
|
|
||||||
@ -994,6 +1018,43 @@ bool check_sofa_collision(int plus_or_minus) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//bool CollisionDetection(const std::vector<Vertex>& object1, const std::vector<Vertex>& object2) {
|
||||||
|
// // Calculate the bounding box for object1
|
||||||
|
// float minX1 = object1[0].x, maxX1 = object1[0].x;
|
||||||
|
// float minY1 = object1[0].y, maxY1 = object1[0].y;
|
||||||
|
// float minZ1 = object1[0].z, maxZ1 = object1[0].z;
|
||||||
|
// for (int i = 1; i < object1.size(); i++) {
|
||||||
|
// minX1 = min(minX1, object1[i].x);
|
||||||
|
// maxX1 = max(maxX1, object1[i].x);
|
||||||
|
// minY1 = min(minY1, object1[i].y);
|
||||||
|
// maxY1 = max(maxY1, object1[i].y);
|
||||||
|
// minZ1 = min(minZ1, object1[i].z);
|
||||||
|
// maxZ1 = max(maxZ1, object1[i].z);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Calculate the bounding box for object2
|
||||||
|
// float minX2 = object2[0].x, maxX2 = object2[0].x;
|
||||||
|
// float minY2 = object2[0].y, maxY2 = object2[0].y;
|
||||||
|
// float minZ2 = object2[0].z, maxZ2 = object2[0].z;
|
||||||
|
// for (int i = 1; i < object2.size(); i++) {
|
||||||
|
// minX2 = min(minX2, object2[i].x);
|
||||||
|
// maxX2 = max(maxX2, object2[i].x);
|
||||||
|
// minY2 = min(minY2, object2[i].y);
|
||||||
|
// maxY2 = max(maxY2, object2[i].y);
|
||||||
|
// minZ2 = min(minZ2, object2[i].z);
|
||||||
|
// maxZ2 = max(maxZ2, object2[i].z);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Check for overlap in x, y, and z
|
||||||
|
// if (maxX1 < minX2 || minX1 > maxX2) return false;
|
||||||
|
// if (maxY1 < minY2 || minY1 > maxY2) return false;
|
||||||
|
// if (maxZ1 < minZ2 || minZ1 > maxZ2) return false;
|
||||||
|
//
|
||||||
|
// // Objects intersect
|
||||||
|
// return true;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//obsluga wejscia
|
//obsluga wejscia
|
||||||
|
BIN
cw 9/textures/123.jpg
Normal file
After Width: | Height: | Size: 243 KiB |
BIN
cw 9/textures/coffeTable.jpg
Normal file
After Width: | Height: | Size: 846 KiB |
BIN
cw 9/textures/coffeTable1.jpg
Normal file
After Width: | Height: | Size: 4.3 MiB |
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 391 KiB |
BIN
cw 9/textures/floor1.jpg
Normal file
After Width: | Height: | Size: 6.7 MiB |
BIN
cw 9/textures/floor2.jpg
Normal file
After Width: | Height: | Size: 266 KiB |
BIN
cw 9/textures/pexels-steve-johnson-1902415.jpg
Normal file
After Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 422 KiB |
Before Width: | Height: | Size: 256 KiB |
BIN
cw 9/textures/sofa1.jpg
Normal file
After Width: | Height: | Size: 871 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
BIN
cw 9/textures/wall2 (Custom) (1).jpg
Normal file
After Width: | Height: | Size: 527 KiB |
BIN
cw 9/textures/wall2.jpg
Normal file
After Width: | Height: | Size: 1.8 MiB |
BIN
cw 9/textures/wall3.jpg
Normal file
After Width: | Height: | Size: 371 KiB |
Before Width: | Height: | Size: 10 MiB After Width: | Height: | Size: 4.6 MiB |
BIN
cw 9/textures/xThing1.png
Normal file
After Width: | Height: | Size: 10 MiB |