Added more assets

This commit is contained in:
Djalim Simaila 2025-10-24 09:50:55 +02:00
parent 646efa9383
commit ab7539aed5
44 changed files with 36718 additions and 2 deletions

17
assets/models/barrel.mtl Normal file
View File

@ -0,0 +1,17 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 05.08.2016 10:36:19
newmtl Material__25
Ns 14.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5880 0.5880 0.5880
Kd 0.5880 0.5880 0.5880
Ks 0.4140 0.4140 0.4140
Ke 0.0000 0.0000 0.0000
map_Ka barrel_diffuse.png
map_Kd barrel_diffuse.png
map_Ks barrel_spec.png

4247
assets/models/barrel.obj Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
#
# Wavefront material file: H:\OpenGL GI Tutorials\Introduction to Modern OpenGL Series\Tutorial code - Dev\Video 10\models\bowling_pin.mtl
#
# Converted by the PolyTrans geometry converter from Okino Computer Graphics, Inc.
# Date/time of export: 06/14/2016 13:24:28
#
# Bounding box of geometry = (-2.3683,-0.000313282,-2.35975) to (2.3762,15.0109,2.35975).
newmtl default
Ns 32
d 1
illum 2
Kd 0.4 0.4 0.4
Ks 0.7 0.7 0.7
Ka 0.3 0.3 0.3
newmtl Material__25
Ns 3
d 1
illum 2
Kd 0.588 0.588 0.588
Ks 0 0 0
Ka 0.588 0.588 0.588
map_Kd amf.tga

10344
assets/models/bowling_pin.obj Normal file

File diff suppressed because it is too large Load Diff

20
assets/models/bunny.mtl Normal file
View File

@ -0,0 +1,20 @@
#
# Wavefront material file: bunny.mtl
#
newmtl default
Ns 32
d 1
illum 2
Kd 0.4 0.4 0.4
Ks 0.7 0.7 0.7
Ka 0.3 0.3 0.3
newmtl default002
Ns 32
d 1
illum 2
Kd 0.4 0.4 0.4
Ks 0.7 0.7 0.7
Ka 0.75 0.75 0.75

10030
assets/models/bunny.obj Normal file

File diff suppressed because it is too large Load Diff

14
assets/models/crate.mtl Normal file
View File

@ -0,0 +1,14 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 01.08.2016 08:06:11
newmtl _crateMaterial__46
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5880 0.5880 0.5880
Kd 0.5880 0.5880 0.5880
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000

49
assets/models/crate.obj Normal file
View File

@ -0,0 +1,49 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 01.08.2016 08:06:11
mtllib crate.mtl
#
# object Box001
#
v -1.0112 -0.0202 1.0112
v -1.0112 -0.0202 -1.0112
v 1.0112 -0.0202 -1.0112
v 1.0112 -0.0202 1.0112
v -1.0112 2.0022 1.0112
v 1.0112 2.0022 1.0112
v 1.0112 2.0022 -1.0112
v -1.0112 2.0022 -1.0112
# 8 vertices
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.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 -1.0000 0.0000 0.0000
# 6 vertex normals
vt 1.0000 0.0000 0.0000
vt 1.0000 1.0000 0.0000
vt 0.0000 1.0000 0.0000
vt 0.0000 0.0000 0.0000
# 4 texture coords
g Box001
usemtl _crateMaterial__46
f 1/1/1 2/2/1 3/3/1
f 3/3/1 4/4/1 1/1/1
f 5/4/2 6/1/2 7/2/2
f 7/2/2 8/3/2 5/4/2
f 1/4/3 4/1/3 6/2/3
f 6/2/3 5/3/3 1/4/3
f 4/4/4 3/1/4 7/2/4
f 7/2/4 6/3/4 4/4/4
f 3/4/5 2/1/5 8/2/5
f 8/2/5 7/3/5 3/4/5
f 2/4/6 1/1/6 5/2/6
f 5/2/6 8/3/6 2/4/6
# 12 faces

25
assets/models/floor.mtl Normal file
View File

@ -0,0 +1,25 @@
#
# Wavefront material file: H:\OpenGL GI Tutorials\Introduction to Modern OpenGL Series\Tutorial code - Dev\Video_9-Load OBJ\floor.mtl
#
# Converted by the PolyTrans geometry converter from Okino Computer Graphics, Inc.
# Date/time of export: 06/07/2016 09:19:49
#
# Bounding box of geometry = (-5,-0.0171537,-5) to (5,-0.0171537,5).
newmtl default
Ns 32
d 1
illum 2
Kd 0.4 0.4 0.4
Ks 0.7 0.7 0.7
Ka 0.3 0.3 0.3
newmtl Material__28
Ns 3
d 1
illum 2
Kd 0.588 0.588 0.588
Ks 0 0 0
Ka 0.588 0.588 0.588
map_Kd floor_tile_006a_reflect.jpg

466
assets/models/floor.obj Normal file
View File

@ -0,0 +1,466 @@
#
# Wavefront OBJ file: H:\OpenGL GI Tutorials\Introduction to Modern OpenGL Series\Tutorial code - Dev\Video_9-Load OBJ\floor.obj
#
# Converted by the PolyTrans geometry converter from Okino Computer Graphics, Inc.
# Date/time of export: 06/07/2016 09:19:49
#
# Bounding box of geometry = (-5,-0.0171537,-5) to (5,-0.0171537,5).
mtllib floor.mtl
# Coordinates for object 'Plane001'
v -5.000000 -0.017154 5.000000
v -4.000000 -0.017154 5.000000
v -3.000000 -0.017154 5.000000
v -2.000000 -0.017154 5.000000
v -1.0 -0.017154 5.000000
v 0.0 -0.017154 5.000000
v 1.0 -0.017154 5.000000
v 2.000000 -0.017154 5.000000
v 3.000000 -0.017154 5.000000
v 4.000000 -0.017154 5.000000
v 5.000000 -0.017154 5.000000
v -5.000000 -0.017154 4.000000
v -4.000000 -0.017154 4.000000
v -3.000000 -0.017154 4.000000
v -2.000000 -0.017154 4.000000
v -1.0 -0.017154 4.000000
v 0.0 -0.017154 4.000000
v 1.0 -0.017154 4.000000
v 2.000000 -0.017154 4.000000
v 3.000000 -0.017154 4.000000
v 4.000000 -0.017154 4.000000
v 5.000000 -0.017154 4.000000
v -5.000000 -0.017154 3.000000
v -4.000000 -0.017154 3.000000
v -3.000000 -0.017154 3.000000
v -2.000000 -0.017154 3.000000
v -1.0 -0.017154 3.000000
v 0.0 -0.017154 3.000000
v 1.0 -0.017154 3.000000
v 2.000000 -0.017154 3.000000
v 3.000000 -0.017154 3.000000
v 4.000000 -0.017154 3.000000
v 5.000000 -0.017154 3.000000
v -5.000000 -0.017154 2.000000
v -4.000000 -0.017154 2.000000
v -3.000000 -0.017154 2.000000
v -2.000000 -0.017154 2.000000
v -1.0 -0.017154 2.000000
v 0.0 -0.017154 2.000000
v 1.0 -0.017154 2.000000
v 2.000000 -0.017154 2.000000
v 3.000000 -0.017154 2.000000
v 4.000000 -0.017154 2.000000
v 5.000000 -0.017154 2.000000
v -5.000000 -0.017154 1.0
v -4.000000 -0.017154 1.0
v -3.000000 -0.017154 1.0
v -2.000000 -0.017154 1.0
v -1.0 -0.017154 1.0
v 0.0 -0.017154 1.0
v 1.0 -0.017154 1.0
v 2.000000 -0.017154 1.0
v 3.000000 -0.017154 1.0
v 4.000000 -0.017154 1.0
v 5.000000 -0.017154 1.0
v -5.000000 -0.017154 0.0
v -4.000000 -0.017154 0.0
v -3.000000 -0.017154 0.0
v -2.000000 -0.017154 0.0
v -1.0 -0.017154 0.0
v 0.0 -0.017154 0.0
v 1.0 -0.017154 0.0
v 2.000000 -0.017154 0.0
v 3.000000 -0.017154 0.0
v 4.000000 -0.017154 0.0
v 5.000000 -0.017154 0.0
v -5.000000 -0.017154 -1.0
v -4.000000 -0.017154 -1.0
v -3.000000 -0.017154 -1.0
v -2.000000 -0.017154 -1.0
v -1.0 -0.017154 -1.0
v 0.0 -0.017154 -1.0
v 1.0 -0.017154 -1.0
v 2.000000 -0.017154 -1.0
v 3.000000 -0.017154 -1.0
v 4.000000 -0.017154 -1.0
v 5.000000 -0.017154 -1.0
v -5.000000 -0.017154 -2.000000
v -4.000000 -0.017154 -2.000000
v -3.000000 -0.017154 -2.000000
v -2.000000 -0.017154 -2.000000
v -1.0 -0.017154 -2.000000
v 0.0 -0.017154 -2.000000
v 1.0 -0.017154 -2.000000
v 2.000000 -0.017154 -2.000000
v 3.000000 -0.017154 -2.000000
v 4.000000 -0.017154 -2.000000
v 5.000000 -0.017154 -2.000000
v -5.000000 -0.017154 -3.000000
v -4.000000 -0.017154 -3.000000
v -3.000000 -0.017154 -3.000000
v -2.000000 -0.017154 -3.000000
v -1.0 -0.017154 -3.000000
v 0.0 -0.017154 -3.000000
v 1.0 -0.017154 -3.000000
v 2.000000 -0.017154 -3.000000
v 3.000000 -0.017154 -3.000000
v 4.000000 -0.017154 -3.000000
v 5.000000 -0.017154 -3.000000
v -5.000000 -0.017154 -4.000000
v -4.000000 -0.017154 -4.000000
v -3.000000 -0.017154 -4.000000
v -2.000000 -0.017154 -4.000000
v -1.0 -0.017154 -4.000000
v 0.0 -0.017154 -4.000000
v 1.0 -0.017154 -4.000000
v 2.000000 -0.017154 -4.000000
v 3.000000 -0.017154 -4.000000
v 4.000000 -0.017154 -4.000000
v 5.000000 -0.017154 -4.000000
v -5.000000 -0.017154 -5.000000
v -4.000000 -0.017154 -5.000000
v -3.000000 -0.017154 -5.000000
v -2.000000 -0.017154 -5.000000
v -1.0 -0.017154 -5.000000
v 0.0 -0.017154 -5.000000
v 1.0 -0.017154 -5.000000
v 2.000000 -0.017154 -5.000000
v 3.000000 -0.017154 -5.000000
v 4.000000 -0.017154 -5.000000
v 5.000000 -0.017154 -5.000000
# 121 vertices
vt 0.0 -7.955076 0.0
vt 0.0 -8.950085 0.0
vt 0.995008 -7.955076 0.0
vt 0.995008 -8.950085 0.0
vt 1.990017 -7.955076 0.0
vt 1.990017 -8.950085 0.0
vt 2.985025 -7.955076 0.0
vt 2.985025 -8.950085 0.0
vt 3.980034 -7.955076 0.0
vt 3.980034 -8.950085 0.0
vt 4.975041 -7.955076 0.0
vt 4.975041 -8.950085 0.0
vt 5.970050 -7.955076 0.0
vt 5.970050 -8.950085 0.0
vt 6.965058 -7.955076 0.0
vt 6.965058 -8.950085 0.0
vt 7.960067 -7.955076 0.0
vt 7.960067 -8.950085 0.0
vt 8.955076 -7.955076 0.0
vt 8.955076 -8.950085 0.0
vt 9.950084 -7.955076 0.0
vt 9.950084 -8.950085 0.0
vt 0.0 -6.960067 0.0
vt 0.995008 -6.960067 0.0
vt 1.990017 -6.960067 0.0
vt 2.985025 -6.960067 0.0
vt 3.980034 -6.960067 0.0
vt 4.975041 -6.960067 0.0
vt 5.970050 -6.960067 0.0
vt 6.965058 -6.960067 0.0
vt 7.960067 -6.960067 0.0
vt 8.955076 -6.960067 0.0
vt 9.950084 -6.960067 0.0
vt 0.0 -5.965059 0.0
vt 0.995008 -5.965059 0.0
vt 1.990017 -5.965059 0.0
vt 2.985025 -5.965059 0.0
vt 3.980034 -5.965059 0.0
vt 4.975041 -5.965059 0.0
vt 5.970050 -5.965059 0.0
vt 6.965058 -5.965059 0.0
vt 7.960067 -5.965059 0.0
vt 8.955076 -5.965059 0.0
vt 9.950084 -5.965059 0.0
vt 0.0 -4.970051 0.0
vt 0.995008 -4.970051 0.0
vt 1.990017 -4.970051 0.0
vt 2.985025 -4.970051 0.0
vt 3.980034 -4.970051 0.0
vt 4.975041 -4.970051 0.0
vt 5.970050 -4.970051 0.0
vt 6.965058 -4.970051 0.0
vt 7.960067 -4.970051 0.0
vt 8.955076 -4.970051 0.0
vt 9.950084 -4.970051 0.0
vt 0.0 -3.975043 0.0
vt 0.995008 -3.975043 0.0
vt 1.990017 -3.975043 0.0
vt 2.985025 -3.975043 0.0
vt 3.980034 -3.975043 0.0
vt 4.975041 -3.975043 0.0
vt 5.970050 -3.975043 0.0
vt 6.965058 -3.975043 0.0
vt 7.960067 -3.975043 0.0
vt 8.955076 -3.975043 0.0
vt 9.950084 -3.975043 0.0
vt 0.0 -2.980034 0.0
vt 0.995008 -2.980034 0.0
vt 1.990017 -2.980034 0.0
vt 2.985025 -2.980034 0.0
vt 3.980034 -2.980034 0.0
vt 4.975041 -2.980034 0.0
vt 5.970050 -2.980034 0.0
vt 6.965058 -2.980034 0.0
vt 7.960067 -2.980034 0.0
vt 8.955076 -2.980034 0.0
vt 9.950084 -2.980034 0.0
vt 0.0 -1.985026 0.0
vt 0.995008 -1.985026 0.0
vt 1.990017 -1.985026 0.0
vt 2.985025 -1.985026 0.0
vt 3.980034 -1.985026 0.0
vt 4.975041 -1.985026 0.0
vt 5.970050 -1.985026 0.0
vt 6.965058 -1.985026 0.0
vt 7.960067 -1.985026 0.0
vt 8.955076 -1.985026 0.0
vt 9.950084 -1.985026 0.0
vt 0.0 -0.990017 0.0
vt 0.995008 -0.990017 0.0
vt 1.990017 -0.990017 0.0
vt 2.985025 -0.990017 0.0
vt 3.980034 -0.990017 0.0
vt 4.975041 -0.990017 0.0
vt 5.970050 -0.990017 0.0
vt 6.965058 -0.990017 0.0
vt 7.960067 -0.990017 0.0
vt 8.955076 -0.990017 0.0
vt 9.950084 -0.990017 0.0
vt 0.0 0.004991 0.0
vt 0.995008 0.004991 0.0
vt 1.990017 0.004991 0.0
vt 2.985025 0.004991 0.0
vt 3.980034 0.004991 0.0
vt 4.975041 0.004991 0.0
vt 5.970050 0.004991 0.0
vt 6.965058 0.004991 0.0
vt 7.960067 0.004991 0.0
vt 8.955076 0.004991 0.0
vt 9.950084 0.004991 0.0
vt 0.0 1.000000 0.0
vt 0.995008 1.000000 0.0
vt 1.990017 1.000000 0.0
vt 2.985025 1.000000 0.0
vt 3.980034 1.000000 0.0
vt 4.975041 1.000000 0.0
vt 5.970050 1.000000 0.0
vt 6.965058 1.000000 0.0
vt 7.960067 1.000000 0.0
vt 8.955076 1.000000 0.0
vt 9.950084 1.000000 0.0
# 121 texture vertices
vn 0.0 1.0 0.0
# 1 normals
usemtl Material__28
g Plane001
s off
f 12/1/1 1/2/1 13/3/1
f 2/4/1 13/3/1 1/2/1
f 13/3/1 2/4/1 14/5/1
f 3/6/1 14/5/1 2/4/1
f 14/5/1 3/6/1 15/7/1
f 4/8/1 15/7/1 3/6/1
f 15/7/1 4/8/1 16/9/1
f 5/10/1 16/9/1 4/8/1
f 16/9/1 5/10/1 17/11/1
f 6/12/1 17/11/1 5/10/1
f 17/11/1 6/12/1 18/13/1
f 7/14/1 18/13/1 6/12/1
f 18/13/1 7/14/1 19/15/1
f 8/16/1 19/15/1 7/14/1
f 19/15/1 8/16/1 20/17/1
f 9/18/1 20/17/1 8/16/1
f 20/17/1 9/18/1 21/19/1
f 10/20/1 21/19/1 9/18/1
f 21/19/1 10/20/1 22/21/1
f 11/22/1 22/21/1 10/20/1
f 23/23/1 12/1/1 24/24/1
f 13/3/1 24/24/1 12/1/1
f 24/24/1 13/3/1 25/25/1
f 14/5/1 25/25/1 13/3/1
f 25/25/1 14/5/1 26/26/1
f 15/7/1 26/26/1 14/5/1
f 26/26/1 15/7/1 27/27/1
f 16/9/1 27/27/1 15/7/1
f 27/27/1 16/9/1 28/28/1
f 17/11/1 28/28/1 16/9/1
f 28/28/1 17/11/1 29/29/1
f 18/13/1 29/29/1 17/11/1
f 29/29/1 18/13/1 30/30/1
f 19/15/1 30/30/1 18/13/1
f 30/30/1 19/15/1 31/31/1
f 20/17/1 31/31/1 19/15/1
f 31/31/1 20/17/1 32/32/1
f 21/19/1 32/32/1 20/17/1
f 32/32/1 21/19/1 33/33/1
f 22/21/1 33/33/1 21/19/1
f 34/34/1 23/23/1 35/35/1
f 24/24/1 35/35/1 23/23/1
f 35/35/1 24/24/1 36/36/1
f 25/25/1 36/36/1 24/24/1
f 36/36/1 25/25/1 37/37/1
f 26/26/1 37/37/1 25/25/1
f 37/37/1 26/26/1 38/38/1
f 27/27/1 38/38/1 26/26/1
f 38/38/1 27/27/1 39/39/1
f 28/28/1 39/39/1 27/27/1
f 39/39/1 28/28/1 40/40/1
f 29/29/1 40/40/1 28/28/1
f 40/40/1 29/29/1 41/41/1
f 30/30/1 41/41/1 29/29/1
f 41/41/1 30/30/1 42/42/1
f 31/31/1 42/42/1 30/30/1
f 42/42/1 31/31/1 43/43/1
f 32/32/1 43/43/1 31/31/1
f 43/43/1 32/32/1 44/44/1
f 33/33/1 44/44/1 32/32/1
f 45/45/1 34/34/1 46/46/1
f 35/35/1 46/46/1 34/34/1
f 46/46/1 35/35/1 47/47/1
f 36/36/1 47/47/1 35/35/1
f 47/47/1 36/36/1 48/48/1
f 37/37/1 48/48/1 36/36/1
f 48/48/1 37/37/1 49/49/1
f 38/38/1 49/49/1 37/37/1
f 49/49/1 38/38/1 50/50/1
f 39/39/1 50/50/1 38/38/1
f 50/50/1 39/39/1 51/51/1
f 40/40/1 51/51/1 39/39/1
f 51/51/1 40/40/1 52/52/1
f 41/41/1 52/52/1 40/40/1
f 52/52/1 41/41/1 53/53/1
f 42/42/1 53/53/1 41/41/1
f 53/53/1 42/42/1 54/54/1
f 43/43/1 54/54/1 42/42/1
f 54/54/1 43/43/1 55/55/1
f 44/44/1 55/55/1 43/43/1
f 56/56/1 45/45/1 57/57/1
f 46/46/1 57/57/1 45/45/1
f 57/57/1 46/46/1 58/58/1
f 47/47/1 58/58/1 46/46/1
f 58/58/1 47/47/1 59/59/1
f 48/48/1 59/59/1 47/47/1
f 59/59/1 48/48/1 60/60/1
f 49/49/1 60/60/1 48/48/1
f 60/60/1 49/49/1 61/61/1
f 50/50/1 61/61/1 49/49/1
f 61/61/1 50/50/1 62/62/1
f 51/51/1 62/62/1 50/50/1
f 62/62/1 51/51/1 63/63/1
f 52/52/1 63/63/1 51/51/1
f 63/63/1 52/52/1 64/64/1
f 53/53/1 64/64/1 52/52/1
f 64/64/1 53/53/1 65/65/1
f 54/54/1 65/65/1 53/53/1
f 65/65/1 54/54/1 66/66/1
f 55/55/1 66/66/1 54/54/1
f 67/67/1 56/56/1 68/68/1
f 57/57/1 68/68/1 56/56/1
f 68/68/1 57/57/1 69/69/1
f 58/58/1 69/69/1 57/57/1
f 69/69/1 58/58/1 70/70/1
f 59/59/1 70/70/1 58/58/1
f 70/70/1 59/59/1 71/71/1
f 60/60/1 71/71/1 59/59/1
f 71/71/1 60/60/1 72/72/1
f 61/61/1 72/72/1 60/60/1
f 72/72/1 61/61/1 73/73/1
f 62/62/1 73/73/1 61/61/1
f 73/73/1 62/62/1 74/74/1
f 63/63/1 74/74/1 62/62/1
f 74/74/1 63/63/1 75/75/1
f 64/64/1 75/75/1 63/63/1
f 75/75/1 64/64/1 76/76/1
f 65/65/1 76/76/1 64/64/1
f 76/76/1 65/65/1 77/77/1
f 66/66/1 77/77/1 65/65/1
f 78/78/1 67/67/1 79/79/1
f 68/68/1 79/79/1 67/67/1
f 79/79/1 68/68/1 80/80/1
f 69/69/1 80/80/1 68/68/1
f 80/80/1 69/69/1 81/81/1
f 70/70/1 81/81/1 69/69/1
f 81/81/1 70/70/1 82/82/1
f 71/71/1 82/82/1 70/70/1
f 82/82/1 71/71/1 83/83/1
f 72/72/1 83/83/1 71/71/1
f 83/83/1 72/72/1 84/84/1
f 73/73/1 84/84/1 72/72/1
f 84/84/1 73/73/1 85/85/1
f 74/74/1 85/85/1 73/73/1
f 85/85/1 74/74/1 86/86/1
f 75/75/1 86/86/1 74/74/1
f 86/86/1 75/75/1 87/87/1
f 76/76/1 87/87/1 75/75/1
f 87/87/1 76/76/1 88/88/1
f 77/77/1 88/88/1 76/76/1
f 89/89/1 78/78/1 90/90/1
f 79/79/1 90/90/1 78/78/1
f 90/90/1 79/79/1 91/91/1
f 80/80/1 91/91/1 79/79/1
f 91/91/1 80/80/1 92/92/1
f 81/81/1 92/92/1 80/80/1
f 92/92/1 81/81/1 93/93/1
f 82/82/1 93/93/1 81/81/1
f 93/93/1 82/82/1 94/94/1
f 83/83/1 94/94/1 82/82/1
f 94/94/1 83/83/1 95/95/1
f 84/84/1 95/95/1 83/83/1
f 95/95/1 84/84/1 96/96/1
f 85/85/1 96/96/1 84/84/1
f 96/96/1 85/85/1 97/97/1
f 86/86/1 97/97/1 85/85/1
f 97/97/1 86/86/1 98/98/1
f 87/87/1 98/98/1 86/86/1
f 98/98/1 87/87/1 99/99/1
f 88/88/1 99/99/1 87/87/1
f 100/100/1 89/89/1 101/101/1
f 90/90/1 101/101/1 89/89/1
f 101/101/1 90/90/1 102/102/1
f 91/91/1 102/102/1 90/90/1
f 102/102/1 91/91/1 103/103/1
f 92/92/1 103/103/1 91/91/1
f 103/103/1 92/92/1 104/104/1
f 93/93/1 104/104/1 92/92/1
f 104/104/1 93/93/1 105/105/1
f 94/94/1 105/105/1 93/93/1
f 105/105/1 94/94/1 106/106/1
f 95/95/1 106/106/1 94/94/1
f 106/106/1 95/95/1 107/107/1
f 96/96/1 107/107/1 95/95/1
f 107/107/1 96/96/1 108/108/1
f 97/97/1 108/108/1 96/96/1
f 108/108/1 97/97/1 109/109/1
f 98/98/1 109/109/1 97/97/1
f 109/109/1 98/98/1 110/110/1
f 99/99/1 110/110/1 98/98/1
f 111/111/1 100/100/1 112/112/1
f 101/101/1 112/112/1 100/100/1
f 112/112/1 101/101/1 113/113/1
f 102/102/1 113/113/1 101/101/1
f 113/113/1 102/102/1 114/114/1
f 103/103/1 114/114/1 102/102/1
f 114/114/1 103/103/1 115/115/1
f 104/104/1 115/115/1 103/103/1
f 115/115/1 104/104/1 116/116/1
f 105/105/1 116/116/1 104/104/1
f 116/116/1 105/105/1 117/117/1
f 106/106/1 117/117/1 105/105/1
f 117/117/1 106/106/1 118/118/1
f 107/107/1 118/118/1 106/106/1
f 118/118/1 107/107/1 119/119/1
f 108/108/1 119/119/1 107/107/1
f 119/119/1 108/108/1 120/120/1
f 109/109/1 120/120/1 108/108/1
f 120/120/1 109/109/1 121/121/1
f 110/110/1 121/121/1 109/109/1
# 200 polygons

View File

@ -0,0 +1,14 @@
# Blender MTL File: 'lampPost1.blend'
# Material Count: 1
newmtl Material__71
Ns 9.803922
Ka 0.588000 0.588000 0.588000
Kd 0.588000 0.588000 0.588000
Ks 0.000000 0.000000 0.000000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
d 1.000000
illum 2
map_Ka lamp_post_diffuse.jpg
map_Kd lamp_post_diffuse.jpg

9764
assets/models/lampPost.obj Normal file

File diff suppressed because it is too large Load Diff

14
assets/models/light.mtl Normal file
View File

@ -0,0 +1,14 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 01.08.2016 09:36:16
newmtl _lightMaterial__43
Ns 36.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5880 0.5880 0.5880
Kd 0.5880 0.5880 0.5880
Ks 0.3240 0.3240 0.3240
Ke 0.0000 0.0000 0.0000

622
assets/models/light.obj Normal file
View File

@ -0,0 +1,622 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 01.08.2016 09:36:16
mtllib light.mtl
#
# object light
#
v 0.0100 0.2214 0.0000
v 0.0100 0.2045 -0.0847
v -0.0224 0.2045 -0.0783
v -0.0499 0.2045 -0.0599
v -0.0683 0.2045 -0.0324
v -0.0747 0.2045 0.0000
v -0.0683 0.2045 0.0324
v -0.0499 0.2045 0.0599
v -0.0224 0.2045 0.0783
v 0.0100 0.2045 0.0847
v 0.0424 0.2045 0.0783
v 0.0699 0.2045 0.0599
v 0.0883 0.2045 0.0324
v 0.0947 0.2045 0.0000
v 0.0883 0.2045 -0.0324
v 0.0699 0.2045 -0.0599
v 0.0424 0.2045 -0.0783
v 0.0100 0.1566 -0.1566
v -0.0499 0.1566 -0.1446
v -0.1007 0.1566 -0.1107
v -0.1346 0.1566 -0.0599
v -0.1466 0.1566 0.0000
v -0.1346 0.1566 0.0599
v -0.1007 0.1566 0.1107
v -0.0499 0.1566 0.1446
v 0.0100 0.1566 0.1566
v 0.0699 0.1566 0.1446
v 0.1207 0.1566 0.1107
v 0.1546 0.1566 0.0599
v 0.1666 0.1566 0.0000
v 0.1546 0.1566 -0.0599
v 0.1207 0.1566 -0.1107
v 0.0699 0.1566 -0.1446
v 0.0100 0.0847 -0.2045
v -0.0683 0.0847 -0.1890
v -0.1346 0.0847 -0.1446
v -0.1790 0.0847 -0.0783
v -0.1945 0.0847 0.0000
v -0.1790 0.0847 0.0783
v -0.1346 0.0847 0.1446
v -0.0683 0.0847 0.1890
v 0.0100 0.0847 0.2045
v 0.0883 0.0847 0.1890
v 0.1546 0.0847 0.1446
v 0.1990 0.0847 0.0783
v 0.2145 0.0847 0.0000
v 0.1990 0.0847 -0.0783
v 0.1546 0.0847 -0.1446
v 0.0883 0.0847 -0.1890
v 0.0100 0.0000 -0.2214
v -0.0747 0.0000 -0.2045
v -0.1466 0.0000 -0.1566
v -0.1945 0.0000 -0.0847
v -0.2114 0.0000 0.0000
v -0.1945 0.0000 0.0847
v -0.1466 0.0000 0.1566
v -0.0747 0.0000 0.2045
v 0.0100 0.0000 0.2214
v 0.0947 0.0000 0.2045
v 0.1666 0.0000 0.1566
v 0.2145 0.0000 0.0847
v 0.2314 0.0000 0.0000
v 0.2145 0.0000 -0.0847
v 0.1666 0.0000 -0.1566
v 0.0947 0.0000 -0.2045
v 0.0100 -0.0847 -0.2045
v -0.0683 -0.0847 -0.1890
v -0.1346 -0.0847 -0.1446
v -0.1790 -0.0847 -0.0783
v -0.1945 -0.0847 0.0000
v -0.1790 -0.0847 0.0783
v -0.1346 -0.0847 0.1446
v -0.0683 -0.0847 0.1890
v 0.0100 -0.0847 0.2045
v 0.0883 -0.0847 0.1890
v 0.1546 -0.0847 0.1446
v 0.1990 -0.0847 0.0783
v 0.2145 -0.0847 0.0000
v 0.1990 -0.0847 -0.0783
v 0.1546 -0.0847 -0.1446
v 0.0883 -0.0847 -0.1890
v 0.0100 -0.1566 -0.1566
v -0.0499 -0.1566 -0.1446
v -0.1007 -0.1566 -0.1107
v -0.1346 -0.1566 -0.0599
v -0.1466 -0.1566 0.0000
v -0.1346 -0.1566 0.0599
v -0.1007 -0.1566 0.1107
v -0.0499 -0.1566 0.1446
v 0.0100 -0.1566 0.1566
v 0.0699 -0.1566 0.1446
v 0.1207 -0.1566 0.1107
v 0.1546 -0.1566 0.0599
v 0.1666 -0.1566 0.0000
v 0.1546 -0.1566 -0.0599
v 0.1207 -0.1566 -0.1107
v 0.0699 -0.1566 -0.1446
v 0.0100 -0.2045 -0.0847
v -0.0224 -0.2045 -0.0783
v -0.0499 -0.2045 -0.0599
v -0.0683 -0.2045 -0.0324
v -0.0747 -0.2045 0.0000
v -0.0683 -0.2045 0.0324
v -0.0499 -0.2045 0.0599
v -0.0224 -0.2045 0.0783
v 0.0100 -0.2045 0.0847
v 0.0424 -0.2045 0.0783
v 0.0699 -0.2045 0.0599
v 0.0883 -0.2045 0.0324
v 0.0947 -0.2045 0.0000
v 0.0883 -0.2045 -0.0324
v 0.0699 -0.2045 -0.0599
v 0.0424 -0.2045 -0.0783
v 0.0100 -0.2214 0.0000
# 114 vertices
vn 0.0000 1.0000 0.0000
vn 0.0000 0.9152 -0.4031
vn -0.1543 0.9152 -0.3724
vn -0.2850 0.9152 -0.2850
vn -0.3724 0.9152 -0.1543
vn -0.4031 0.9152 0.0000
vn -0.3724 0.9152 0.1543
vn -0.2850 0.9152 0.2850
vn -0.1543 0.9152 0.3724
vn 0.0000 0.9152 0.4031
vn 0.1543 0.9152 0.3724
vn 0.2850 0.9152 0.2850
vn 0.3724 0.9152 0.1543
vn 0.4031 0.9152 0.0000
vn 0.3724 0.9152 -0.1543
vn 0.2850 0.9152 -0.2850
vn 0.1543 0.9152 -0.3724
vn 0.0000 0.6952 -0.7189
vn -0.2751 0.6952 -0.6641
vn -0.5083 0.6952 -0.5083
vn -0.6641 0.6952 -0.2751
vn -0.7189 0.6952 0.0000
vn -0.6641 0.6952 0.2751
vn -0.5083 0.6952 0.5083
vn -0.2751 0.6952 0.6641
vn 0.0000 0.6952 0.7189
vn 0.2751 0.6952 0.6641
vn 0.5083 0.6952 0.5083
vn 0.6641 0.6952 0.2751
vn 0.7189 0.6952 0.0000
vn 0.6641 0.6952 -0.2751
vn 0.5083 0.6952 -0.5083
vn 0.2751 0.6952 -0.6641
vn 0.0000 0.3744 -0.9273
vn -0.3549 0.3744 -0.8567
vn -0.6557 0.3744 -0.6557
vn -0.8567 0.3744 -0.3549
vn -0.9273 0.3744 0.0000
vn -0.8567 0.3744 0.3549
vn -0.6557 0.3744 0.6557
vn -0.3549 0.3744 0.8567
vn 0.0000 0.3744 0.9273
vn 0.3549 0.3744 0.8567
vn 0.6557 0.3744 0.6557
vn 0.8567 0.3744 0.3549
vn 0.9273 0.3744 0.0000
vn 0.8567 0.3744 -0.3549
vn 0.6557 0.3744 -0.6557
vn 0.3549 0.3744 -0.8567
vn 0.0000 0.0000 -1.0000
vn -0.3827 0.0000 -0.9239
vn -0.7071 0.0000 -0.7071
vn -0.9239 0.0000 -0.3827
vn -1.0000 0.0000 0.0000
vn -0.9239 0.0000 0.3827
vn -0.7071 0.0000 0.7071
vn -0.3827 0.0000 0.9239
vn 0.0000 0.0000 1.0000
vn 0.3827 0.0000 0.9239
vn 0.7071 0.0000 0.7071
vn 0.9239 0.0000 0.3827
vn 1.0000 0.0000 0.0000
vn 0.9239 0.0000 -0.3827
vn 0.7071 0.0000 -0.7071
vn 0.3827 0.0000 -0.9239
vn 0.0000 -0.3744 -0.9273
vn -0.3549 -0.3744 -0.8567
vn -0.6557 -0.3744 -0.6557
vn -0.8567 -0.3744 -0.3549
vn -0.9273 -0.3744 0.0000
vn -0.8567 -0.3744 0.3549
vn -0.6557 -0.3744 0.6557
vn -0.3549 -0.3744 0.8567
vn 0.0000 -0.3744 0.9273
vn 0.3549 -0.3744 0.8567
vn 0.6557 -0.3744 0.6557
vn 0.8567 -0.3744 0.3549
vn 0.9273 -0.3744 0.0000
vn 0.8567 -0.3744 -0.3549
vn 0.6557 -0.3744 -0.6557
vn 0.3549 -0.3744 -0.8567
vn 0.0000 -0.6952 -0.7189
vn -0.2751 -0.6952 -0.6641
vn -0.5083 -0.6952 -0.5083
vn -0.6641 -0.6952 -0.2751
vn -0.7189 -0.6952 0.0000
vn -0.6641 -0.6952 0.2751
vn -0.5083 -0.6952 0.5083
vn -0.2751 -0.6952 0.6641
vn 0.0000 -0.6952 0.7189
vn 0.2751 -0.6952 0.6641
vn 0.5083 -0.6952 0.5083
vn 0.6641 -0.6952 0.2751
vn 0.7189 -0.6952 0.0000
vn 0.6641 -0.6952 -0.2751
vn 0.5083 -0.6952 -0.5083
vn 0.2751 -0.6952 -0.6641
vn 0.0000 -0.9152 -0.4031
vn -0.1543 -0.9152 -0.3724
vn -0.2850 -0.9152 -0.2850
vn -0.3724 -0.9152 -0.1543
vn -0.4031 -0.9152 0.0000
vn -0.3724 -0.9152 0.1543
vn -0.2850 -0.9152 0.2850
vn -0.1543 -0.9152 0.3724
vn 0.0000 -0.9152 0.4031
vn 0.1543 -0.9152 0.3724
vn 0.2850 -0.9152 0.2850
vn 0.3724 -0.9152 0.1543
vn 0.4031 -0.9152 0.0000
vn 0.3724 -0.9152 -0.1543
vn 0.2850 -0.9152 -0.2850
vn 0.1543 -0.9152 -0.3724
vn 0.0000 -1.0000 0.0000
# 114 vertex normals
vt 0.0000 1.0000 0.0000
vt 0.0000 0.8750 0.0000
vt 0.0625 0.8750 0.0000
vt 0.0625 1.0000 0.0000
vt 0.1250 0.8750 0.0000
vt 0.1250 1.0000 0.0000
vt 0.1875 0.8750 0.0000
vt 0.1875 1.0000 0.0000
vt 0.2500 0.8750 0.0000
vt 0.2500 1.0000 0.0000
vt 0.3125 0.8750 0.0000
vt 0.3125 1.0000 0.0000
vt 0.3750 0.8750 0.0000
vt 0.3750 1.0000 0.0000
vt 0.4375 0.8750 0.0000
vt 0.4375 1.0000 0.0000
vt 0.5000 0.8750 0.0000
vt 0.5000 1.0000 0.0000
vt 0.5625 0.8750 0.0000
vt 0.5625 1.0000 0.0000
vt 0.6250 0.8750 0.0000
vt 0.6250 1.0000 0.0000
vt 0.6875 0.8750 0.0000
vt 0.6875 1.0000 0.0000
vt 0.7500 0.8750 0.0000
vt 0.7500 1.0000 0.0000
vt 0.8125 0.8750 0.0000
vt 0.8125 1.0000 0.0000
vt 0.8750 0.8750 0.0000
vt 0.8750 1.0000 0.0000
vt 0.9375 0.8750 0.0000
vt 0.9375 1.0000 0.0000
vt 1.0000 0.8750 0.0000
vt 0.0000 0.7500 0.0000
vt 0.0625 0.7500 0.0000
vt 0.1250 0.7500 0.0000
vt 0.1875 0.7500 0.0000
vt 0.2500 0.7500 0.0000
vt 0.3125 0.7500 0.0000
vt 0.3750 0.7500 0.0000
vt 0.4375 0.7500 0.0000
vt 0.5000 0.7500 0.0000
vt 0.5625 0.7500 0.0000
vt 0.6250 0.7500 0.0000
vt 0.6875 0.7500 0.0000
vt 0.7500 0.7500 0.0000
vt 0.8125 0.7500 0.0000
vt 0.8750 0.7500 0.0000
vt 0.9375 0.7500 0.0000
vt 1.0000 0.7500 0.0000
vt 0.0000 0.6250 0.0000
vt 0.0625 0.6250 0.0000
vt 0.1250 0.6250 0.0000
vt 0.1875 0.6250 0.0000
vt 0.2500 0.6250 0.0000
vt 0.3125 0.6250 0.0000
vt 0.3750 0.6250 0.0000
vt 0.4375 0.6250 0.0000
vt 0.5000 0.6250 0.0000
vt 0.5625 0.6250 0.0000
vt 0.6250 0.6250 0.0000
vt 0.6875 0.6250 0.0000
vt 0.7500 0.6250 0.0000
vt 0.8125 0.6250 0.0000
vt 0.8750 0.6250 0.0000
vt 0.9375 0.6250 0.0000
vt 1.0000 0.6250 0.0000
vt 0.0000 0.5000 0.0000
vt 0.0625 0.5000 0.0000
vt 0.1250 0.5000 0.0000
vt 0.1875 0.5000 0.0000
vt 0.2500 0.5000 0.0000
vt 0.3125 0.5000 0.0000
vt 0.3750 0.5000 0.0000
vt 0.4375 0.5000 0.0000
vt 0.5000 0.5000 0.0000
vt 0.5625 0.5000 0.0000
vt 0.6250 0.5000 0.0000
vt 0.6875 0.5000 0.0000
vt 0.7500 0.5000 0.0000
vt 0.8125 0.5000 0.0000
vt 0.8750 0.5000 0.0000
vt 0.9375 0.5000 0.0000
vt 1.0000 0.5000 0.0000
vt 0.0000 0.3750 0.0000
vt 0.0625 0.3750 0.0000
vt 0.1250 0.3750 0.0000
vt 0.1875 0.3750 0.0000
vt 0.2500 0.3750 0.0000
vt 0.3125 0.3750 0.0000
vt 0.3750 0.3750 0.0000
vt 0.4375 0.3750 0.0000
vt 0.5000 0.3750 0.0000
vt 0.5625 0.3750 0.0000
vt 0.6250 0.3750 0.0000
vt 0.6875 0.3750 0.0000
vt 0.7500 0.3750 0.0000
vt 0.8125 0.3750 0.0000
vt 0.8750 0.3750 0.0000
vt 0.9375 0.3750 0.0000
vt 1.0000 0.3750 0.0000
vt 0.0000 0.2500 0.0000
vt 0.0625 0.2500 0.0000
vt 0.1250 0.2500 0.0000
vt 0.1875 0.2500 0.0000
vt 0.2500 0.2500 0.0000
vt 0.3125 0.2500 0.0000
vt 0.3750 0.2500 0.0000
vt 0.4375 0.2500 0.0000
vt 0.5000 0.2500 0.0000
vt 0.5625 0.2500 0.0000
vt 0.6250 0.2500 0.0000
vt 0.6875 0.2500 0.0000
vt 0.7500 0.2500 0.0000
vt 0.8125 0.2500 0.0000
vt 0.8750 0.2500 0.0000
vt 0.9375 0.2500 0.0000
vt 1.0000 0.2500 0.0000
vt 0.0000 0.1250 0.0000
vt 0.0625 0.1250 0.0000
vt 0.1250 0.1250 0.0000
vt 0.1875 0.1250 0.0000
vt 0.2500 0.1250 0.0000
vt 0.3125 0.1250 0.0000
vt 0.3750 0.1250 0.0000
vt 0.4375 0.1250 0.0000
vt 0.5000 0.1250 0.0000
vt 0.5625 0.1250 0.0000
vt 0.6250 0.1250 0.0000
vt 0.6875 0.1250 0.0000
vt 0.7500 0.1250 0.0000
vt 0.8125 0.1250 0.0000
vt 0.8750 0.1250 0.0000
vt 0.9375 0.1250 0.0000
vt 1.0000 0.1250 0.0000
vt 0.0000 0.0000 0.0000
vt 0.0625 0.0000 0.0000
vt 0.1250 0.0000 0.0000
vt 0.1875 0.0000 0.0000
vt 0.2500 0.0000 0.0000
vt 0.3125 0.0000 0.0000
vt 0.3750 0.0000 0.0000
vt 0.4375 0.0000 0.0000
vt 0.5000 0.0000 0.0000
vt 0.5625 0.0000 0.0000
vt 0.6250 0.0000 0.0000
vt 0.6875 0.0000 0.0000
vt 0.7500 0.0000 0.0000
vt 0.8125 0.0000 0.0000
vt 0.8750 0.0000 0.0000
vt 0.9375 0.0000 0.0000
# 151 texture coords
g light
usemtl _lightMaterial__43
f 1/1/1 2/2/2 3/3/3
f 1/4/1 3/3/3 4/5/4
f 1/6/1 4/5/4 5/7/5
f 1/8/1 5/7/5 6/9/6
f 1/10/1 6/9/6 7/11/7
f 1/12/1 7/11/7 8/13/8
f 1/14/1 8/13/8 9/15/9
f 1/16/1 9/15/9 10/17/10
f 1/18/1 10/17/10 11/19/11
f 1/20/1 11/19/11 12/21/12
f 1/22/1 12/21/12 13/23/13
f 1/24/1 13/23/13 14/25/14
f 1/26/1 14/25/14 15/27/15
f 1/28/1 15/27/15 16/29/16
f 1/30/1 16/29/16 17/31/17
f 1/32/1 17/31/17 2/33/2
f 2/2/2 18/34/18 19/35/19
f 2/2/2 19/35/19 3/3/3
f 3/3/3 19/35/19 20/36/20
f 3/3/3 20/36/20 4/5/4
f 4/5/4 20/36/20 21/37/21
f 4/5/4 21/37/21 5/7/5
f 5/7/5 21/37/21 22/38/22
f 5/7/5 22/38/22 6/9/6
f 6/9/6 22/38/22 23/39/23
f 6/9/6 23/39/23 7/11/7
f 7/11/7 23/39/23 24/40/24
f 7/11/7 24/40/24 8/13/8
f 8/13/8 24/40/24 25/41/25
f 8/13/8 25/41/25 9/15/9
f 9/15/9 25/41/25 26/42/26
f 9/15/9 26/42/26 10/17/10
f 10/17/10 26/42/26 27/43/27
f 10/17/10 27/43/27 11/19/11
f 11/19/11 27/43/27 28/44/28
f 11/19/11 28/44/28 12/21/12
f 12/21/12 28/44/28 29/45/29
f 12/21/12 29/45/29 13/23/13
f 13/23/13 29/45/29 30/46/30
f 13/23/13 30/46/30 14/25/14
f 14/25/14 30/46/30 31/47/31
f 14/25/14 31/47/31 15/27/15
f 15/27/15 31/47/31 32/48/32
f 15/27/15 32/48/32 16/29/16
f 16/29/16 32/48/32 33/49/33
f 16/29/16 33/49/33 17/31/17
f 17/31/17 33/49/33 18/50/18
f 17/31/17 18/50/18 2/33/2
f 18/34/18 34/51/34 35/52/35
f 18/34/18 35/52/35 19/35/19
f 19/35/19 35/52/35 36/53/36
f 19/35/19 36/53/36 20/36/20
f 20/36/20 36/53/36 37/54/37
f 20/36/20 37/54/37 21/37/21
f 21/37/21 37/54/37 38/55/38
f 21/37/21 38/55/38 22/38/22
f 22/38/22 38/55/38 39/56/39
f 22/38/22 39/56/39 23/39/23
f 23/39/23 39/56/39 40/57/40
f 23/39/23 40/57/40 24/40/24
f 24/40/24 40/57/40 41/58/41
f 24/40/24 41/58/41 25/41/25
f 25/41/25 41/58/41 42/59/42
f 25/41/25 42/59/42 26/42/26
f 26/42/26 42/59/42 43/60/43
f 26/42/26 43/60/43 27/43/27
f 27/43/27 43/60/43 44/61/44
f 27/43/27 44/61/44 28/44/28
f 28/44/28 44/61/44 45/62/45
f 28/44/28 45/62/45 29/45/29
f 29/45/29 45/62/45 46/63/46
f 29/45/29 46/63/46 30/46/30
f 30/46/30 46/63/46 47/64/47
f 30/46/30 47/64/47 31/47/31
f 31/47/31 47/64/47 48/65/48
f 31/47/31 48/65/48 32/48/32
f 32/48/32 48/65/48 49/66/49
f 32/48/32 49/66/49 33/49/33
f 33/49/33 49/66/49 34/67/34
f 33/49/33 34/67/34 18/50/18
f 34/51/34 50/68/50 51/69/51
f 34/51/34 51/69/51 35/52/35
f 35/52/35 51/69/51 52/70/52
f 35/52/35 52/70/52 36/53/36
f 36/53/36 52/70/52 53/71/53
f 36/53/36 53/71/53 37/54/37
f 37/54/37 53/71/53 54/72/54
f 37/54/37 54/72/54 38/55/38
f 38/55/38 54/72/54 55/73/55
f 38/55/38 55/73/55 39/56/39
f 39/56/39 55/73/55 56/74/56
f 39/56/39 56/74/56 40/57/40
f 40/57/40 56/74/56 57/75/57
f 40/57/40 57/75/57 41/58/41
f 41/58/41 57/75/57 58/76/58
f 41/58/41 58/76/58 42/59/42
f 42/59/42 58/76/58 59/77/59
f 42/59/42 59/77/59 43/60/43
f 43/60/43 59/77/59 60/78/60
f 43/60/43 60/78/60 44/61/44
f 44/61/44 60/78/60 61/79/61
f 44/61/44 61/79/61 45/62/45
f 45/62/45 61/79/61 62/80/62
f 45/62/45 62/80/62 46/63/46
f 46/63/46 62/80/62 63/81/63
f 46/63/46 63/81/63 47/64/47
f 47/64/47 63/81/63 64/82/64
f 47/64/47 64/82/64 48/65/48
f 48/65/48 64/82/64 65/83/65
f 48/65/48 65/83/65 49/66/49
f 49/66/49 65/83/65 50/84/50
f 49/66/49 50/84/50 34/67/34
f 50/68/50 66/85/66 67/86/67
f 50/68/50 67/86/67 51/69/51
f 51/69/51 67/86/67 68/87/68
f 51/69/51 68/87/68 52/70/52
f 52/70/52 68/87/68 69/88/69
f 52/70/52 69/88/69 53/71/53
f 53/71/53 69/88/69 70/89/70
f 53/71/53 70/89/70 54/72/54
f 54/72/54 70/89/70 71/90/71
f 54/72/54 71/90/71 55/73/55
f 55/73/55 71/90/71 72/91/72
f 55/73/55 72/91/72 56/74/56
f 56/74/56 72/91/72 73/92/73
f 56/74/56 73/92/73 57/75/57
f 57/75/57 73/92/73 74/93/74
f 57/75/57 74/93/74 58/76/58
f 58/76/58 74/93/74 75/94/75
f 58/76/58 75/94/75 59/77/59
f 59/77/59 75/94/75 76/95/76
f 59/77/59 76/95/76 60/78/60
f 60/78/60 76/95/76 77/96/77
f 60/78/60 77/96/77 61/79/61
f 61/79/61 77/96/77 78/97/78
f 61/79/61 78/97/78 62/80/62
f 62/80/62 78/97/78 79/98/79
f 62/80/62 79/98/79 63/81/63
f 63/81/63 79/98/79 80/99/80
f 63/81/63 80/99/80 64/82/64
f 64/82/64 80/99/80 81/100/81
f 64/82/64 81/100/81 65/83/65
f 65/83/65 81/100/81 66/101/66
f 65/83/65 66/101/66 50/84/50
f 66/85/66 82/102/82 83/103/83
f 66/85/66 83/103/83 67/86/67
f 67/86/67 83/103/83 84/104/84
f 67/86/67 84/104/84 68/87/68
f 68/87/68 84/104/84 85/105/85
f 68/87/68 85/105/85 69/88/69
f 69/88/69 85/105/85 86/106/86
f 69/88/69 86/106/86 70/89/70
f 70/89/70 86/106/86 87/107/87
f 70/89/70 87/107/87 71/90/71
f 71/90/71 87/107/87 88/108/88
f 71/90/71 88/108/88 72/91/72
f 72/91/72 88/108/88 89/109/89
f 72/91/72 89/109/89 73/92/73
f 73/92/73 89/109/89 90/110/90
f 73/92/73 90/110/90 74/93/74
f 74/93/74 90/110/90 91/111/91
f 74/93/74 91/111/91 75/94/75
f 75/94/75 91/111/91 92/112/92
f 75/94/75 92/112/92 76/95/76
f 76/95/76 92/112/92 93/113/93
f 76/95/76 93/113/93 77/96/77
f 77/96/77 93/113/93 94/114/94
f 77/96/77 94/114/94 78/97/78
f 78/97/78 94/114/94 95/115/95
f 78/97/78 95/115/95 79/98/79
f 79/98/79 95/115/95 96/116/96
f 79/98/79 96/116/96 80/99/80
f 80/99/80 96/116/96 97/117/97
f 80/99/80 97/117/97 81/100/81
f 81/100/81 97/117/97 82/118/82
f 81/100/81 82/118/82 66/101/66
f 82/102/82 98/119/98 99/120/99
f 82/102/82 99/120/99 83/103/83
f 83/103/83 99/120/99 100/121/100
f 83/103/83 100/121/100 84/104/84
f 84/104/84 100/121/100 101/122/101
f 84/104/84 101/122/101 85/105/85
f 85/105/85 101/122/101 102/123/102
f 85/105/85 102/123/102 86/106/86
f 86/106/86 102/123/102 103/124/103
f 86/106/86 103/124/103 87/107/87
f 87/107/87 103/124/103 104/125/104
f 87/107/87 104/125/104 88/108/88
f 88/108/88 104/125/104 105/126/105
f 88/108/88 105/126/105 89/109/89
f 89/109/89 105/126/105 106/127/106
f 89/109/89 106/127/106 90/110/90
f 90/110/90 106/127/106 107/128/107
f 90/110/90 107/128/107 91/111/91
f 91/111/91 107/128/107 108/129/108
f 91/111/91 108/129/108 92/112/92
f 92/112/92 108/129/108 109/130/109
f 92/112/92 109/130/109 93/113/93
f 93/113/93 109/130/109 110/131/110
f 93/113/93 110/131/110 94/114/94
f 94/114/94 110/131/110 111/132/111
f 94/114/94 111/132/111 95/115/95
f 95/115/95 111/132/111 112/133/112
f 95/115/95 112/133/112 96/116/96
f 96/116/96 112/133/112 113/134/113
f 96/116/96 113/134/113 97/117/97
f 97/117/97 113/134/113 98/135/98
f 97/117/97 98/135/98 82/118/82
f 114/136/114 99/120/99 98/119/98
f 114/137/114 100/121/100 99/120/99
f 114/138/114 101/122/101 100/121/100
f 114/139/114 102/123/102 101/122/101
f 114/140/114 103/124/103 102/123/102
f 114/141/114 104/125/104 103/124/103
f 114/142/114 105/126/105 104/125/104
f 114/143/114 106/127/106 105/126/105
f 114/144/114 107/128/107 106/127/106
f 114/145/114 108/129/108 107/128/107
f 114/146/114 109/130/109 108/129/108
f 114/147/114 110/131/110 109/130/109
f 114/148/114 111/132/111 110/131/110
f 114/149/114 112/133/112 111/132/111
f 114/150/114 113/134/113 112/133/112
f 114/151/114 98/135/98 113/134/113
# 224 faces

13
assets/models/robot.mtl Normal file
View File

@ -0,0 +1,13 @@
#
# Wavefront material file: robot.mtl
#
newmtl robot_material
Ns 3
d 1
illum 2
Kd 0.588 0.588 0.588
Ks 0 0 0
Ka 0.588 0.588 0.588
map_Kd robot_diffuse.jpg

View File

@ -0,0 +1,16 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 31.07.2016 14:40:04
newmtl Material__47
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5880 0.5880 0.5880
Kd 0.5880 0.5880 0.5880
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka H:\OpenGL GI Tutorials\Introduction to Modern OpenGL Series\Tutorial code - Dev\Video 10\textures\woodcrate_diffuse.jpg
map_Kd H:\OpenGL GI Tutorials\Introduction to Modern OpenGL Series\Tutorial code - Dev\Video 10\textures\woodcrate_diffuse.jpg

321
assets/models/woodcrate.obj Normal file
View File

@ -0,0 +1,321 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 31.07.2016 14:40:04
mtllib woodcrate.mtl
#
# object default001
#
v 0.9253 1.7693 0.7653
v 0.9253 0.2387 0.7653
v 0.9253 0.2387 -0.7653
v 0.9253 1.7693 -0.7653
v -0.9253 1.7693 0.7653
v -0.9253 1.7693 -0.7653
v -0.9253 0.2387 -0.7653
v -0.9253 0.2387 0.7653
v -0.7653 0.0787 0.7653
v -0.7653 0.0787 -0.7653
v 0.7653 0.0787 -0.7653
v 0.7653 0.0787 0.7653
v -0.7653 1.7693 0.9253
v -0.7653 0.2387 0.9253
v 0.7653 0.2387 0.9253
v 0.7653 1.7693 0.9253
v -0.7653 1.9293 -0.7653
v -0.7653 1.9293 0.7653
v 0.7653 1.9293 0.7653
v 0.7653 1.9293 -0.7653
v -0.7653 0.2387 -0.9253
v -0.7653 1.7693 -0.9253
v 0.7653 1.7693 -0.9253
v 0.7653 0.2387 -0.9253
v 1.0044 1.7693 -0.7653
v 1.0044 0.2387 -0.7653
v 1.0044 -0.0004 -1.0044
v 1.0044 2.0084 -1.0044
v 1.0044 1.7693 0.7653
v 1.0044 2.0084 1.0044
v 1.0044 0.2387 0.7653
v 1.0044 -0.0004 1.0044
v -1.0044 0.2387 0.7653
v -1.0044 0.2387 -0.7653
v -1.0044 -0.0004 -1.0044
v -1.0044 -0.0004 1.0044
v -1.0044 1.7693 0.7653
v -1.0044 2.0084 1.0044
v -1.0044 1.7693 -0.7653
v -1.0044 2.0084 -1.0044
v 0.7653 -0.0004 0.7653
v 0.7653 -0.0004 -0.7653
v -0.7653 -0.0004 0.7653
v -0.7653 -0.0004 -0.7653
v 0.7653 1.7693 1.0044
v 0.7653 0.2387 1.0044
v -0.7653 1.7693 1.0044
v -0.7653 0.2387 1.0044
v 0.7653 2.0084 -0.7653
v 0.7653 2.0084 0.7653
v -0.7653 2.0084 -0.7653
v -0.7653 2.0084 0.7653
v 0.7653 0.2387 -1.0044
v 0.7653 1.7693 -1.0044
v -0.7653 0.2387 -1.0044
v -0.7653 1.7693 -1.0044
v 0.9911 0.3012 -0.8945
v 0.9911 1.8750 0.7034
v 0.9911 1.6734 0.9020
v 0.9911 0.0996 -0.6960
v 0.9071 0.0996 -0.6960
v 0.9071 1.6734 0.9020
v 0.9071 1.8750 0.7034
v 0.9071 0.3012 -0.8945
v -0.8736 1.6734 -0.9844
v -0.6751 1.8750 -0.9844
v 0.9229 0.3012 -0.9844
v 0.7243 0.0996 -0.9844
v 0.7243 0.0996 -0.9004
v -0.8736 1.6734 -0.9004
v -0.6751 1.8750 -0.9004
v 0.9229 0.3012 -0.9004
v -0.8736 0.0226 -0.6739
v -0.6751 0.0226 -0.8755
v 0.9229 0.0226 0.6983
v 0.7243 0.0226 0.8999
v 0.7243 0.1066 0.8999
v -0.8736 0.1066 -0.6739
v -0.6751 0.1066 -0.8755
v 0.9229 0.1066 0.6983
v -0.8800 1.9851 0.6611
v -0.6815 1.9851 0.8627
v 0.9165 1.9851 -0.7110
v 0.7179 1.9851 -0.9127
v 0.7179 1.9012 -0.9127
v -0.8800 1.9012 0.6611
v -0.6815 1.9012 0.8627
v 0.9165 1.9012 -0.7110
v -0.8800 0.3344 0.9716
v -0.6815 0.1328 0.9716
v 0.9165 1.7065 0.9716
v 0.7179 1.9082 0.9716
v 0.7179 1.9082 0.8876
v -0.8800 0.3344 0.8876
v -0.6815 0.1328 0.8876
v 0.9165 1.7065 0.8876
v -0.9730 0.3012 0.9020
v -0.9730 1.8750 -0.6960
v -0.9730 1.6734 -0.8945
v -0.9730 0.0996 0.7034
v -0.8891 0.0996 0.7034
v -0.8891 1.6734 -0.8945
v -0.8891 1.8750 -0.6960
v -0.8891 0.3012 0.9020
# 104 vertices
vn 1.0000 0.0000 -0.0000
vn -1.0000 0.0000 -0.0000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 1.0000 -0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 -0.7125 0.7017
vn 0.0000 0.7125 -0.7017
vn -0.7017 -0.7125 -0.0000
vn 0.7017 0.7125 -0.0000
vn -0.7017 0.0000 0.7125
vn 0.7017 0.0000 -0.7125
vn -0.7017 0.0000 -0.7125
vn 0.7017 0.0000 0.7125
vn -0.7017 0.7125 -0.0000
vn 0.7017 -0.7125 -0.0000
vn 0.0000 -0.7125 -0.7017
vn 0.0000 0.7125 0.7017
# 18 vertex normals
vt 0.1194 0.8806 0.0000
vt 0.1194 0.1194 0.0000
vt 0.8806 0.1194 0.0000
vt 0.8806 0.8806 0.0000
vt 0.9995 0.0005 0.0000
vt 0.9995 0.9995 0.0000
vt 0.0005 0.9995 0.0000
vt 0.0005 0.0005 0.0000
vt 0.8806 0.0398 0.0000
vt 0.1194 0.0398 0.0000
vt 0.1194 0.0005 0.0000
vt 0.8806 0.0005 0.0000
vt 0.1194 0.9602 0.0000
vt 0.8806 0.9602 0.0000
vt 0.8806 0.9995 0.0000
vt 0.1194 0.9995 0.0000
vt 0.9602 0.8806 0.0000
vt 0.9602 0.1194 0.0000
vt 0.9995 0.1194 0.0000
vt 0.9995 0.8806 0.0000
vt 0.0398 0.1194 0.0000
vt 0.0398 0.8806 0.0000
vt 0.0005 0.8806 0.0000
vt 0.0005 0.1194 0.0000
vt 0.7829 0.1235 0.0000
vt 0.1260 0.7793 0.0000
vt 0.2186 0.8731 0.0000
vt 0.8770 0.2192 0.0000
vt 0.0508 0.1105 0.0000
vt 0.0950 0.1105 0.0000
vt 0.0950 1.0000 0.0000
vt 0.0508 1.0000 0.0000
vt 0.0508 0.8895 0.0000
vt 0.0950 0.8895 0.0000
vt 0.0950 0.0000 0.0000
vt 0.0508 0.0000 0.0000
# 36 texture coords
g default001
usemtl Material__47
f 1/1/1 2/2/1 3/3/1
f 3/3/1 4/4/1 1/1/1
f 5/4/2 6/1/2 7/2/2
f 7/2/2 8/3/2 5/4/2
f 9/4/3 10/1/3 11/2/3
f 11/2/3 12/3/3 9/4/3
f 13/4/4 14/1/4 15/2/4
f 15/2/4 16/3/4 13/4/4
f 17/4/5 18/1/5 19/2/5
f 19/2/5 20/3/5 17/4/5
f 21/4/6 22/1/6 23/2/6
f 23/2/6 24/3/6 21/4/6
f 25/4/1 26/3/1 27/5/1
f 27/5/1 28/6/1 25/4/1
f 29/1/1 25/4/1 28/6/1
f 28/6/1 30/7/1 29/1/1
f 31/2/1 29/1/1 30/7/1
f 30/7/1 32/8/1 31/2/1
f 26/3/1 31/2/1 32/8/1
f 32/8/1 27/5/1 26/3/1
f 33/3/2 34/2/2 35/8/2
f 35/8/2 36/5/2 33/3/2
f 37/4/2 33/3/2 36/5/2
f 36/5/2 38/6/2 37/4/2
f 39/1/2 37/4/2 38/6/2
f 38/6/2 40/7/2 39/1/2
f 34/2/2 39/1/2 40/7/2
f 40/7/2 35/8/2 34/2/2
f 41/3/3 42/2/3 27/8/3
f 27/8/3 32/5/3 41/3/3
f 43/4/3 41/3/3 32/5/3
f 32/5/3 36/6/3 43/4/3
f 44/1/3 43/4/3 36/6/3
f 36/6/3 35/7/3 44/1/3
f 42/2/3 44/1/3 35/7/3
f 35/7/3 27/8/3 42/2/3
f 45/3/4 46/2/4 32/8/4
f 32/8/4 30/5/4 45/3/4
f 47/4/4 45/3/4 30/5/4
f 30/5/4 38/6/4 47/4/4
f 48/1/4 47/4/4 38/6/4
f 38/6/4 36/7/4 48/1/4
f 46/2/4 48/1/4 36/7/4
f 36/7/4 32/8/4 46/2/4
f 49/3/5 50/2/5 30/8/5
f 30/8/5 28/5/5 49/3/5
f 51/4/5 49/3/5 28/5/5
f 28/5/5 40/6/5 51/4/5
f 52/1/5 51/4/5 40/6/5
f 40/6/5 38/7/5 52/1/5
f 50/2/5 52/1/5 38/7/5
f 38/7/5 30/8/5 50/2/5
f 53/3/6 54/2/6 28/8/6
f 28/8/6 27/5/6 53/3/6
f 55/4/6 53/3/6 27/5/6
f 27/5/6 35/6/6 55/4/6
f 56/1/6 55/4/6 35/6/6
f 35/6/6 40/7/6 56/1/6
f 54/2/6 56/1/6 40/7/6
f 40/7/6 28/8/6 54/2/6
f 4/9/4 3/10/4 26/11/4
f 26/11/4 25/12/4 4/9/4
f 1/9/3 4/10/3 25/11/3
f 25/11/3 29/12/3 1/9/3
f 2/9/6 1/10/6 29/11/6
f 29/11/6 31/12/6 2/9/6
f 3/9/5 2/10/5 31/11/5
f 31/11/5 26/12/5 3/9/5
f 8/13/5 7/14/5 34/15/5
f 34/15/5 33/16/5 8/13/5
f 5/13/6 8/14/6 33/15/6
f 33/15/6 37/16/6 5/13/6
f 6/13/3 5/14/3 37/15/3
f 37/15/3 39/16/3 6/13/3
f 7/13/4 6/14/4 39/15/4
f 39/15/4 34/16/4 7/13/4
f 12/9/2 11/10/2 42/11/2
f 42/11/2 41/12/2 12/9/2
f 9/17/6 12/18/6 41/19/6
f 41/19/6 43/20/6 9/17/6
f 10/9/1 9/10/1 43/11/1
f 43/11/1 44/12/1 10/9/1
f 11/21/4 10/22/4 44/23/4
f 44/23/4 42/24/4 11/21/4
f 16/17/2 15/18/2 46/19/2
f 46/19/2 45/20/2 16/17/2
f 13/17/3 16/18/3 45/19/3
f 45/19/3 47/20/3 13/17/3
f 14/21/1 13/22/1 47/23/1
f 47/23/1 48/24/1 14/21/1
f 15/21/5 14/22/5 48/23/5
f 48/23/5 46/24/5 15/21/5
f 20/13/2 19/14/2 50/15/2
f 50/15/2 49/16/2 20/13/2
f 17/17/4 20/18/4 49/19/4
f 49/19/4 51/20/4 17/17/4
f 18/13/1 17/14/1 51/15/1
f 51/15/1 52/16/1 18/13/1
f 19/21/6 18/22/6 52/23/6
f 52/23/6 50/24/6 19/21/6
f 24/21/2 23/22/2 54/23/2
f 54/23/2 53/24/2 24/21/2
f 21/17/5 24/18/5 53/19/5
f 53/19/5 55/20/5 21/17/5
f 22/17/1 21/18/1 55/19/1
f 55/19/1 56/20/1 22/17/1
f 23/21/3 22/22/3 56/23/3
f 56/23/3 54/24/3 23/21/3
f 57/25/1 58/26/1 59/27/1
f 59/27/1 60/28/1 57/25/1
f 61/29/7 60/30/7 59/31/7
f 59/31/7 62/32/7 61/29/7
f 63/33/8 58/34/8 57/35/8
f 57/35/8 64/36/8 63/33/8
f 65/27/6 66/26/6 67/25/6
f 67/25/6 68/28/6 65/27/6
f 65/31/9 68/30/9 69/29/9
f 69/29/9 70/32/9 65/31/9
f 67/35/10 66/34/10 71/33/10
f 71/33/10 72/36/10 67/35/10
f 73/27/3 74/26/3 75/25/3
f 75/25/3 76/28/3 73/27/3
f 73/31/11 76/30/11 77/29/11
f 77/29/11 78/32/11 73/31/11
f 75/35/12 74/34/12 79/33/12
f 79/33/12 80/36/12 75/35/12
f 81/27/5 82/26/5 83/25/5
f 83/25/5 84/28/5 81/27/5
f 81/31/13 84/30/13 85/29/13
f 85/29/13 86/32/13 81/31/13
f 83/35/14 82/34/14 87/33/14
f 87/33/14 88/36/14 83/35/14
f 89/27/4 90/26/4 91/25/4
f 91/25/4 92/28/4 89/27/4
f 89/31/15 92/30/15 93/29/15
f 93/29/15 94/32/15 89/31/15
f 91/35/16 90/34/16 95/33/16
f 95/33/16 96/36/16 91/35/16
f 97/25/2 98/26/2 99/27/2
f 99/27/2 100/28/2 97/25/2
f 101/29/17 100/30/17 99/31/17
f 99/31/17 102/32/17 101/29/17
f 103/33/18 98/34/18 97/35/18
f 97/35/18 104/36/18 103/33/18
# 144 faces

13
assets/shaders/bulb.frag Normal file
View File

@ -0,0 +1,13 @@
//-----------------------------------------------------------------------------
// Fragment shader for light bulb mesh
//-----------------------------------------------------------------------------
#version 330 core
uniform vec3 lightColor;
out vec4 frag_color;
void main()
{
frag_color = vec4(lightColor, 1.0f);
};

20
assets/shaders/bulb.vert Normal file
View File

@ -0,0 +1,20 @@
//-----------------------------------------------------------------------------
// Vertex shader for light bulb mesh
//-----------------------------------------------------------------------------
#version 330 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 texCoord;
uniform mat4 model; // model matrix
uniform mat4 view; // view matrix
uniform mat4 projection; // projection matrix
out vec2 TexCoord;
void main()
{
gl_Position = projection * view * model * vec4(pos, 1.0f);
TexCoord = texCoord;
};

View File

@ -6,6 +6,6 @@ uniform sampler2D ourTexture;
void main() void main()
{ {
FragColor = vec4(1.0f, 0.5f, 0.2f, 1.0f); //FragColor = vec4(1.0f, 0.5f, 0.2f, 1.0f);
//FragColor = texture(ourTexture, TexCoord); FragColor = texture(ourTexture, TexCoord);
} }

View File

@ -0,0 +1,39 @@
//-----------------------------------------------------------------------------
// Fragment shader for Blinn-Phong lighting
//-----------------------------------------------------------------------------
#version 330 core
in vec2 TexCoord;
in vec3 FragPos;
in vec3 Normal;
uniform sampler2D texture_map;
uniform vec3 lightPos; // for diffuse
uniform vec3 lightColor; // for diffuse
uniform vec3 viewPos; // for specular
out vec4 frag_color;
void main()
{
// Ambient ---------------------------------------------------------
float ambientFactor = 0.1f;
vec3 ambient = lightColor * ambientFactor;
// Diffuse ------------------------------------
vec3 normal = normalize(Normal);
vec3 lightDir = normalize(lightPos - FragPos);
float NDotL = max(dot(normal, lightDir), 0.0);
vec3 diffuse = lightColor * NDotL;
// Specular (Blinn-Phong)-------------------------------------------
float specularFactor = 0.8f;
float shininess = 32.0f;
vec3 viewDir = normalize(viewPos - FragPos);
vec3 halfDir = normalize(lightDir + viewDir);
float NDotH = max(dot(normal, halfDir), 0.0);
vec3 specular = lightColor * specularFactor * pow(NDotH, shininess);
vec4 texel = texture(texture_map, TexCoord);
frag_color = vec4(ambient + diffuse + specular, 1.0f) * texel;
}

View File

@ -0,0 +1,26 @@
//-----------------------------------------------------------------------------
// Vertex shader for phong lighting
//-----------------------------------------------------------------------------
#version 330 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 texCoord;
uniform mat4 model; // model matrix
uniform mat4 view; // view matrix
uniform mat4 projection; // projection matrix
out vec3 FragPos;
out vec3 Normal;
out vec2 TexCoord;
void main()
{
FragPos = vec3(model * vec4(pos, 1.0f)); // vertex position in world space
Normal = normal;
TexCoord = texCoord;
gl_Position = projection * view * model * vec4(pos, 1.0f);
}

View File

@ -0,0 +1,50 @@
//-----------------------------------------------------------------------------
// Fragment shader for directional light
//-----------------------------------------------------------------------------
#version 330 core
struct Material
{
vec3 ambient;
sampler2D diffuseMap;
vec3 specular;
float shininess;
};
struct DirectionalLight
{
vec3 direction;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
in vec2 TexCoord;
in vec3 FragPos;
in vec3 Normal;
uniform DirectionalLight dirLight;
uniform Material material;
uniform vec3 viewPos;
out vec4 frag_color;
void main()
{
// Ambient -------------------------------------------------------------------------
vec3 ambient = dirLight.ambient * material.ambient * vec3(texture(material.diffuseMap, TexCoord));
// Diffuse -------------------------------------------------------------------------
vec3 normal = normalize(Normal);
vec3 lightDir = normalize(-dirLight.direction); // negate => Must be a direction from fragment towards the light
float NdotL = max(dot(normal, lightDir), 0.0);
vec3 diffuse = dirLight.diffuse * NdotL * vec3(texture(material.diffuseMap, TexCoord));
// Specular - Blinn-Phong ----------------------------------------------------------
vec3 viewDir = normalize(viewPos - FragPos);
vec3 halfDir = normalize(lightDir + viewDir);
float NDotH = max(dot(normal, halfDir), 0.0);
vec3 specular = dirLight.specular * material.specular * pow(NDotH, material.shininess);
frag_color = vec4(ambient + diffuse + specular, 1.0f);
}

View File

@ -0,0 +1,26 @@
//-----------------------------------------------------------------------------
// Vertex shader for directional light
//-----------------------------------------------------------------------------
#version 330 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 texCoord;
uniform mat4 model; // model matrix
uniform mat4 view; // view matrix
uniform mat4 projection; // projection matrix
out vec3 FragPos;
out vec3 Normal;
out vec2 TexCoord;
void main()
{
FragPos = vec3(model * vec4(pos, 1.0f)); // vertex position in world space
Normal = mat3(transpose(inverse(model))) * normal; // normal direction in world space
TexCoord = texCoord;
gl_Position = projection * view * model * vec4(pos, 1.0f);
}

View File

@ -0,0 +1,173 @@
//-----------------------------------------------------------------------------
// Fragment shader for multiple lights
//
// NOTE:
// This is not the most effient shader code but it gets the point across
// and should be easy to follow. The same diffuse and specular calculations
// are completed 3 separate times. This can be optimized to be calculated
// only once with attenuation and spotlight multipliers applied.
//-----------------------------------------------------------------------------
#version 330 core
struct Material
{
vec3 ambient;
sampler2D diffuseMap;
vec3 specular;
float shininess;
};
struct DirectionalLight
{
vec3 direction;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
struct PointLight
{
vec3 position;
vec3 ambient;
vec3 diffuse;
vec3 specular;
float constant;
float linear;
float exponent;
};
struct SpotLight
{
vec3 position;
vec3 direction;
float cosInnerCone;
float cosOuterCone;
vec3 ambient;
vec3 diffuse;
vec3 specular;
int on;
float constant;
float linear;
float exponent;
};
in vec2 TexCoord;
in vec3 FragPos;
in vec3 Normal;
#define MAX_POINT_LIGHTS 3
uniform DirectionalLight sunLight;
uniform PointLight pointLights[MAX_POINT_LIGHTS];
uniform SpotLight spotLight;
uniform Material material;
uniform vec3 viewPos;
out vec4 frag_color;
vec3 calcDirectionalLightColor(DirectionalLight light, vec3 normal, vec3 viewDir);
vec3 calcPointLightColor(PointLight light, vec3 normal, vec3 fragPos, vec3 viewDir);
vec3 calcSpotLightColor(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir);
//-----------------------------------------------------------------------------------------------
// Main Shader Entry
//-----------------------------------------------------------------------------------------------
void main()
{
vec3 normal = normalize(Normal);
vec3 viewDir = normalize(viewPos - FragPos);
// Ambient ----------------------------------------------------------------------------------
vec3 ambient = spotLight.ambient * material.ambient * vec3(texture(material.diffuseMap, TexCoord));
vec3 outColor = vec3(0.0f);
outColor += calcDirectionalLightColor(sunLight, normal, viewDir);
for(int i = 0; i < MAX_POINT_LIGHTS; i++)
outColor += calcPointLightColor(pointLights[i], normal, FragPos, viewDir);
// If the light isn't on then just return 0 for diffuse and specular colors
if (spotLight.on == 1)
outColor += calcSpotLightColor(spotLight, normal, FragPos, viewDir);
frag_color = vec4(ambient + outColor, 1.0f);
}
//-----------------------------------------------------------------------------------------------
// Calculate the direction light effect and return the resulting
// diffuse and specular color summation
//-----------------------------------------------------------------------------------------------
vec3 calcDirectionalLightColor(DirectionalLight light, vec3 normal, vec3 viewDir)
{
vec3 lightDir = normalize(-light.direction); // negate => Must be a direction from fragment towards the light
// Diffuse ------------------------------------------------------------------------- --------
float NdotL = max(dot(normal, lightDir), 0.0);
vec3 diffuse = light.diffuse * NdotL * vec3(texture(material.diffuseMap, TexCoord));
// Specular - Blinn-Phong ------------------------------------------------------------------
vec3 halfDir = normalize(lightDir + viewDir);
float NDotH = max(dot(normal, halfDir), 0.0f);
vec3 specular = light.specular * material.specular * pow(NDotH, material.shininess);
return (diffuse + specular);
}
//-----------------------------------------------------------------------------------------------
// Calculate the point light effect and return the resulting diffuse and specular color summation
//-----------------------------------------------------------------------------------------------
vec3 calcPointLightColor(PointLight light, vec3 normal, vec3 fragPos, vec3 viewDir)
{
vec3 lightDir = normalize(light.position - fragPos);
// Diffuse ----------------------------------------------------------------------------------
float NdotL = max(dot(normal, lightDir), 0.0);
vec3 diffuse = light.diffuse * NdotL * vec3(texture(material.diffuseMap, TexCoord));
// Specular - Blinn-Phong ------------------------------------------------------------------
vec3 halfDir = normalize(lightDir + viewDir);
float NDotH = max(dot(normal, halfDir), 0.0f);
vec3 specular = light.specular * material.specular * pow(NDotH, material.shininess);
// Attenuation using Kc, Kl, Kq -------------------------------------------------------------
float d = length(light.position - FragPos);
float attenuation = 1.0f / (light.constant + light.linear * d + light.exponent * (d * d));
diffuse *= attenuation;
specular *= attenuation;
return (diffuse + specular);
}
//------------------------------------------------------------------------------------------------
// Calculate the spotlight effect and return the resulting // diffuse and specular color summation
//------------------------------------------------------------------------------------------------
vec3 calcSpotLightColor(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir)
{
vec3 lightDir = normalize(light.position - fragPos);
vec3 spotDir = normalize(light.direction);
float cosDir = dot(-lightDir, spotDir); // angle between the lights direction vector and spotlights direction vector
float spotIntensity = smoothstep(light.cosOuterCone, light.cosInnerCone, cosDir);
// Diffuse ----------------------------------------------------------------------------------
float NdotL = max(dot(normal, lightDir), 0.0);
vec3 diffuse = spotLight.diffuse * NdotL * vec3(texture(material.diffuseMap, TexCoord));
// Specular - Blinn-Phong ------------------------------------------------------------------
vec3 halfDir = normalize(lightDir + viewDir);
float NDotH = max(dot(normal, halfDir), 0.0f);
vec3 specular = light.specular * material.specular * pow(NDotH, material.shininess);
// Attenuation using Kc, Kl, Kq -------------------------------------------------------------
float d = length(light.position - FragPos);
float attenuation = 1.0f / (light.constant + light.linear * d + light.exponent * (d * d));
diffuse *= attenuation * spotIntensity;
specular *= attenuation * spotIntensity;
return (diffuse + specular);
}

View File

@ -0,0 +1,26 @@
//-----------------------------------------------------------------------------
// Vertex shader for multiple lights
//-----------------------------------------------------------------------------
#version 330 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 texCoord;
uniform mat4 model; // model matrix
uniform mat4 view; // view matrix
uniform mat4 projection; // projection matrix
out vec3 FragPos;
out vec3 Normal;
out vec2 TexCoord;
void main()
{
FragPos = vec3(model * vec4(pos, 1.0f)); // vertex position in world space
Normal = mat3(transpose(inverse(model))) * normal; // normal direction in world space
TexCoord = texCoord;
gl_Position = projection * view * model * vec4(pos, 1.0f);
}

View File

@ -0,0 +1,39 @@
//-----------------------------------------------------------------------------
// Fragment shader for Phong lighting
//-----------------------------------------------------------------------------
#version 330 core
in vec2 TexCoord;
in vec3 FragPos;
in vec3 Normal;
uniform sampler2D texSampler1;
uniform vec3 lightPos; // for diffuse
uniform vec3 lightColor; // for diffuse
uniform vec3 viewPos; // for specular
out vec4 frag_color;
void main()
{
// Ambient ---------------------------------------------------------
float ambientFactor = 0.1f;
vec3 ambient = lightColor * ambientFactor;
// Diffuse -------------------------------------------------------
vec3 normal = normalize(Normal);
vec3 lightDir = normalize(lightPos - FragPos);
float NDotL = max(dot(normal, lightDir), 0.0f);
vec3 diffuse = lightColor * NDotL;
// Specular (Phong)------------------------------------------------
float specularFactor = 0.8f;
float shininess = 32.0f;
vec3 viewDir = normalize(viewPos - FragPos);
vec3 reflectDir = reflect(-lightDir, normal);
float RDotV = max(dot(reflectDir, viewDir), 0.0f);
vec3 specular = lightColor * specularFactor * pow(RDotV, shininess);
vec4 texel = texture(texSampler1, TexCoord);
frag_color= vec4(ambient + diffuse + specular, 1.0f) * texel;
}

View File

@ -0,0 +1,27 @@
//-----------------------------------------------------------------------------
// Vertex shader
//-----------------------------------------------------------------------------
#version 330 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 texCoord;
uniform mat4 model; // model matrix
uniform mat4 view; // view matrix
uniform mat4 projection; // projection matrix
out vec3 FragPos;
out vec3 Normal;
out vec2 TexCoord;
void main()
{
FragPos = vec3(model * vec4(pos, 1.0f)); // fragment position in world space
Normal = mat3(transpose(inverse(model))) * normal; // normal direction in world space
// comment out for solid color
TexCoord = texCoord;
gl_Position = projection * view * model * vec4(pos, 1.0f);
}

View File

@ -0,0 +1,50 @@
//-----------------------------------------------------------------------------
// Fragment shader for Blinn-Phong lighting with materials
//-----------------------------------------------------------------------------
#version 330 core
struct Material
{
vec3 ambient;
sampler2D diffuseMap;
vec3 specular;
float shininess;
};
struct Light
{
vec3 position;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
in vec2 TexCoord;
in vec3 FragPos;
in vec3 Normal;
uniform Light light;
uniform Material material;
uniform vec3 viewPos;
out vec4 frag_color;
void main()
{
// Ambient -------------------------------------------------------------------------
vec3 ambient = light.ambient * material.ambient;
// Diffuse -------------------------------------------------------------------------
vec3 normal = normalize(Normal);
vec3 lightDir = normalize(light.position - FragPos);
float NdotL = max(dot(normal, lightDir), 0.0);
vec3 diffuse = light.diffuse * NdotL * vec3(texture(material.diffuseMap, TexCoord));
// Specular - Blinn-Phong ----------------------------------------------------------
vec3 viewDir = normalize(viewPos - FragPos);
vec3 halfDir = normalize(lightDir + viewDir);
float NDotH = max(dot(normal, halfDir), 0.0);
vec3 specular = light.specular * material.specular * pow(NDotH, material.shininess);
frag_color = vec4(ambient + diffuse + specular, 1.0f);
}

View File

@ -0,0 +1,26 @@
//-----------------------------------------------------------------------------
// Vertex shader for Blinn-Phong lighting with materials
//-----------------------------------------------------------------------------
#version 330 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 texCoord;
uniform mat4 model; // model matrix
uniform mat4 view; // view matrix
uniform mat4 projection; // projection matrix
out vec3 FragPos;
out vec3 Normal;
out vec2 TexCoord;
void main()
{
FragPos = vec3(model * vec4(pos, 1.0f)); // vertex position in world space
Normal = mat3(transpose(inverse(model))) * normal; // normal direction in world space
TexCoord = texCoord;
gl_Position = projection * view * model * vec4(pos, 1.0f);
}

View File

@ -0,0 +1,61 @@
//-----------------------------------------------------------------------------
// Fragment shader for point light
//-----------------------------------------------------------------------------
#version 330 core
struct Material
{
vec3 ambient;
sampler2D diffuseMap;
vec3 specular;
float shininess;
};
struct PointLight
{
vec3 position;
vec3 ambient;
vec3 diffuse;
vec3 specular;
float constant;
float linear;
float exponent;
};
in vec2 TexCoord;
in vec3 FragPos;
in vec3 Normal;
uniform PointLight pointLight;
uniform Material material;
uniform vec3 viewPos;
out vec4 frag_color;
void main()
{
// Ambient ------------------------------------------------------------------------------
vec3 ambient = pointLight.ambient * material.ambient * vec3(texture(material.diffuseMap, TexCoord));
// Diffuse ------------------------------------------------------------------------------
vec3 normal = normalize(Normal);
vec3 lightDir = normalize(pointLight.position - FragPos);
float NdotL = max(dot(normal, lightDir), 0.0);
vec3 diffuse = pointLight.diffuse * NdotL * vec3(texture(material.diffuseMap, TexCoord));
// Specular - Blinn-Phong --------------------------------------------------------------
vec3 viewDir = normalize(viewPos - FragPos);
vec3 halfDir = normalize(lightDir + viewDir);
float NDotH = max(dot(normal, halfDir), 0.0);
vec3 specular = pointLight.specular * material.specular * pow(NDotH, material.shininess);
// Attenuation using Kc, Kl, Kq ---------------------------------------------------------
float d = length(pointLight.position - FragPos); // distance to light
float attenuation = 1.0f / (pointLight.constant + pointLight.linear * d + pointLight.exponent * (d * d));
diffuse *= attenuation;
specular *= attenuation;
frag_color = vec4(ambient + diffuse + specular, 1.0f);
};

View File

@ -0,0 +1,26 @@
//-----------------------------------------------------------------------------
// Vertex shader for point light
//-----------------------------------------------------------------------------
#version 330 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 texCoord;
uniform mat4 model; // model matrix
uniform mat4 view; // view matrix
uniform mat4 projection; // projection matrix
out vec3 FragPos;
out vec3 Normal;
out vec2 TexCoord;
void main()
{
FragPos = vec3(model * vec4(pos, 1.0f)); // vertex position in world space
Normal = mat3(transpose(inverse(model))) * normal; // normal direction in world space
TexCoord = texCoord;
gl_Position = projection * view * model * vec4(pos, 1.0f);
}

View File

@ -0,0 +1,87 @@
//-----------------------------------------------------------------------------
// Fragment shader for spot light
//-----------------------------------------------------------------------------
#version 330 core
struct Material
{
vec3 ambient;
sampler2D diffuseMap;
vec3 specular;
float shininess;
};
struct SpotLight
{
vec3 position;
vec3 direction;
float cosInnerCone;
float cosOuterCone;
vec3 ambient;
vec3 diffuse;
vec3 specular;
int on;
float constant;
float linear;
float exponent;
};
in vec2 TexCoord;
in vec3 FragPos;
in vec3 Normal;
uniform SpotLight spotLight;
uniform Material material;
uniform vec3 viewPos;
out vec4 frag_color;
vec3 calcSpotLight();
void main()
{
// Ambient -------------------------------------------------------------------------
vec3 ambient = spotLight.ambient * material.ambient * vec3(texture(material.diffuseMap, TexCoord));
vec3 spotColor = vec3(0.0f);
// If the light isn't on then just return 0 for diffuse and specular colors
if (spotLight.on == 1)
spotColor = calcSpotLight();
frag_color = vec4(ambient + spotColor, 1.0f);
};
//--------------------------------------------------------------
// Calculate the spotlight effect and return the resulting
// diffuse and specular color summation
//--------------------------------------------------------------
vec3 calcSpotLight()
{
vec3 lightDir = normalize(spotLight.position - FragPos);
vec3 spotDir = normalize(spotLight.direction);
float cosDir = dot(-lightDir, spotDir); // angle between the lights direction vector and spotlights direction vector
float spotIntensity = smoothstep(spotLight.cosOuterCone, spotLight.cosInnerCone, cosDir);
// Diffuse -------------------------------------------------------------------------
vec3 normal = normalize(Normal);
float NdotL = max(dot(normal, lightDir), 0.0);
vec3 diffuse = spotLight.diffuse * NdotL * vec3(texture(material.diffuseMap, TexCoord));
// Specular - Blinn-Phong ----------------------------------------------------------
vec3 viewDir = normalize(viewPos - FragPos);
vec3 halfDir = normalize(lightDir + viewDir);
float NDotH = max(dot(normal, halfDir), 0.0f);
vec3 specular = spotLight.specular * material.specular * pow(NDotH, material.shininess);
// Attenuation using Kc, Kl, Kq -----------------------------------------------------
float d = length(spotLight.position - FragPos); // distance to light
float attenuation = 1.0f / (spotLight.constant + spotLight.linear * d + spotLight.exponent * (d * d));
diffuse *= attenuation * spotIntensity;
specular *= attenuation * spotIntensity;
return (diffuse + specular);
}

View File

@ -0,0 +1,26 @@
//-----------------------------------------------------------------------------
// Vertex shader for spot light
//-----------------------------------------------------------------------------
#version 330 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 texCoord;
uniform mat4 model; // model matrix
uniform mat4 view; // view matrix
uniform mat4 projection; // projection matrix
out vec3 FragPos;
out vec3 Normal;
out vec2 TexCoord;
void main()
{
FragPos = vec3(model * vec4(pos, 1.0f)); // vertex position in world space
Normal = mat3(transpose(inverse(model))) * normal; // normal direction in world space
TexCoord = texCoord;
gl_Position = projection * view * model * vec4(pos, 1.0f);
}

BIN
assets/textures/AMF.tga Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
assets/textures/crate.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB