~leinnan/raylibGame unlisted

6a5364dca2e2aaca05354e9c9231beace87038ce — Piotr Siuszko 4 months ago 15ab87e
Add tree
5 files changed, 424 insertions(+), 2 deletions(-)

A data/gfx/tree.mtl
A data/gfx/tree.obj
A data/gfx/tree.png
M data/shaders/pixelizer.fs
M data/test.json
A data/gfx/tree.mtl => data/gfx/tree.mtl +13 -0
@@ 0,0 1,13 @@
# Blender MTL File: 'treee.blend'
# Material Count: 1

newmtl Material.001
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 2
map_Kd C:\\Users\\48785\\Documents\\treee.png

A data/gfx/tree.obj => data/gfx/tree.obj +379 -0
@@ 0,0 1,379 @@
# Blender v2.80 (sub 75) OBJ File: 'treee.blend'
# www.blender.org
mtllib tree.mtl
o Cube_Cube.002
v -0.423689 -0.190884 0.463098
v -0.423689 0.721445 0.463098
v -0.423689 -0.190884 -0.369565
v -0.423689 0.721445 -0.369565
v 0.408974 -0.190884 0.463098
v 0.408974 0.721445 0.463098
v 0.408974 -0.190884 -0.369565
v 0.408974 0.721445 -0.369565
v 0.001434 0.647422 -2.013335
v -1.902774 0.647422 -0.629847
v -1.175431 0.647422 1.608684
v 1.178299 0.647422 1.608684
v 1.905642 0.647422 -0.629847
v 0.015508 1.671207 -1.372092
v -1.190694 1.671207 -0.495735
v -0.729966 1.671207 0.922240
v 0.760981 1.671207 0.922240
v 1.221709 1.671207 -0.495735
v 0.013307 1.538286 -1.715258
v -1.533047 1.538286 -0.591766
v -0.942392 1.538286 1.226083
v 0.969007 1.538286 1.226083
v 1.559661 1.538286 -0.591766
v 0.020204 2.345541 -1.164676
v -0.959319 2.345541 -0.453011
v -0.585175 2.345541 0.698487
v 0.625582 2.345541 0.698487
v 0.999727 2.345541 -0.453011
v 0.633212 2.168332 -1.437755
v -1.034083 2.168332 -1.118084
v -1.245280 2.168332 0.566391
v 0.291488 2.168332 1.287784
v 1.452460 2.168332 0.049152
v 0.408735 2.855165 -0.961620
v -0.647396 2.855165 -0.759127
v -0.781177 2.855165 0.307887
v 0.192274 2.855165 0.764846
v 0.927680 2.855165 -0.019753
v 1.028644 2.632119 -1.061634
v -0.527439 2.632119 -1.391773
v -1.322276 2.632119 -0.013868
v -0.257428 2.632119 1.167862
v 1.195520 2.632119 0.520307
v 0.651650 3.591029 -0.673532
v -0.334036 3.591029 -0.882655
v -0.837517 3.591029 -0.009835
v -0.163000 3.591029 0.738720
v 0.757356 3.591029 0.328533
v 1.190651 3.156363 0.399836
v 0.895881 3.156363 -1.085596
v -0.607939 3.156363 -1.264276
v -1.242579 3.156363 0.110726
v -0.130989 3.156363 1.139204
v 0.364684 4.777342 0.188332
v 0.272001 4.777342 -0.278721
v -0.200833 4.777342 -0.334902
v -0.400378 4.777342 0.097429
v -0.050869 4.777342 0.420806
v 0.956479 4.080376 0.397645
v 0.721610 4.194713 -0.812602
v -0.517448 4.276196 -0.954629
v -1.048332 4.212362 0.167660
v -0.137390 4.091366 1.003379
v 0.066557 5.527298 0.187053
vt 0.050882 0.980002
vt 0.018682 0.939488
vt 0.052214 0.944598
vt 0.047476 0.944291
vt 0.078749 0.983777
vt 0.048402 0.978609
vt 0.084549 0.983096
vt 0.052186 0.945288
vt 0.085878 0.948465
vt 0.048428 0.979816
vt 0.017147 0.941474
vt 0.047476 0.944291
vt 0.195173 0.958304
vt 0.192743 0.954948
vt 0.195173 0.953795
vt 0.198595 0.953098
vt 0.196188 0.956451
vt 0.196188 0.953552
vt 0.202262 0.939561
vt 0.205249 0.942312
vt 0.203154 0.943764
vt 0.210416 0.947527
vt 0.208078 0.943848
vt 0.210416 0.942742
vt 0.205249 0.937333
vt 0.204684 0.939650
vt 0.196188 0.942294
vt 0.191566 0.943802
vt 0.196188 0.937412
vt 0.205738 0.948971
vt 0.205738 0.952064
vt 0.202810 0.953020
vt 0.201000 0.950518
vt 0.202810 0.948016
vt 0.212658 0.959153
vt 0.210735 0.956374
vt 0.212658 0.955491
vt 0.188709 0.939852
vt 0.191566 0.935903
vt 0.212634 0.951776
vt 0.210735 0.954555
vt 0.210735 0.952201
vt 0.193763 0.946773
vt 0.196161 0.949005
vt 0.194487 0.950186
vt 0.212254 0.946628
vt 0.210416 0.943620
vt 0.212254 0.942742
vt 0.196161 0.944962
vt 0.195702 0.946843
vt 0.196188 0.939111
vt 0.198508 0.935903
vt 0.198508 0.942318
vt 0.209097 0.939191
vt 0.206719 0.939967
vt 0.205249 0.937935
vt 0.206719 0.935903
vt 0.209097 0.936679
vt 0.202262 0.937128
vt 0.202262 0.941092
vt 0.209278 0.951776
vt 0.210501 0.954638
vt 0.208908 0.954651
vt 0.204117 0.956534
vt 0.205724 0.953641
vt 0.205724 0.955867
vt 0.212916 0.942484
vt 0.211273 0.939700
vt 0.212916 0.939204
vt 0.209278 0.957473
vt 0.210735 0.956426
vt 0.204707 0.956725
vt 0.203081 0.959384
vt 0.203081 0.957240
vt 0.201582 0.943406
vt 0.201582 0.946927
vt 0.198249 0.942318
vt 0.196161 0.950875
vt 0.196161 0.953106
vt 0.194049 0.953795
vt 0.192743 0.951990
vt 0.194049 0.950186
vt 0.198249 0.948016
vt 0.196188 0.945167
vt 0.203081 0.956725
vt 0.201000 0.959222
vt 0.201000 0.957179
vt 0.205557 0.945089
vt 0.208078 0.946893
vt 0.206096 0.948016
vt 0.200749 0.956599
vt 0.198595 0.959181
vt 0.198595 0.957091
vt 0.206096 0.942742
vt 0.207736 0.945040
vt 0.211273 0.939204
vt 0.209097 0.941906
vt 0.209097 0.939826
vt 0.188709 0.946472
vt 0.190639 0.943802
vt 0.190639 0.949141
vt 0.188709 0.955610
vt 0.189932 0.953919
vt 0.191911 0.954565
vt 0.191911 0.956655
vt 0.189932 0.957301
vt 0.193763 0.944822
vt 0.193763 0.948121
vt 0.192638 0.953919
vt 0.189093 0.952869
vt 0.192638 0.951812
vt 0.208865 0.948016
vt 0.206829 0.951776
vt 0.205738 0.948016
vt 0.208724 0.958979
vt 0.207123 0.955447
vt 0.208062 0.955447
vt 0.188709 0.952029
vt 0.191416 0.949141
vt 0.204117 0.956725
vt 0.202408 0.953020
vt 0.203388 0.953020
vt 0.198026 0.948016
vt 0.201000 0.948986
vt 0.196188 0.950557
vt 0.208908 0.958272
vt 0.209486 0.957473
vt 0.210422 0.957778
vt 0.210422 0.958766
vt 0.209486 0.959071
vt 0.201000 0.952127
vt 0.198026 0.953098
vt 0.206808 0.954262
vt 0.205738 0.953008
vt 0.208908 0.951776
vt 0.200982 0.956599
vt 0.198595 0.955617
vt 0.200982 0.953098
vt 0.211469 0.939204
vt 0.209097 0.938523
vt 0.211469 0.935903
vt 0.208908 0.955447
vt 0.211419 0.951352
vt 0.208865 0.951352
vt 0.210400 0.948016
vt 0.203101 0.948016
vt 0.201582 0.945950
vt 0.205557 0.947216
vt 0.203101 0.943873
vt 0.205557 0.944656
vt 0.017370 0.974879
vt 0.077816 0.949512
vt 0.050886 0.979905
vt 0.018056 0.977071
vt 0.192743 0.957804
vt 0.198595 0.957674
vt 0.208078 0.946879
vt 0.203154 0.935903
vt 0.210735 0.958693
vt 0.212634 0.955491
vt 0.210416 0.946082
vt 0.194487 0.943802
vt 0.210735 0.952817
vt 0.204117 0.953020
vt 0.211273 0.941778
vt 0.204707 0.960110
vt 0.203081 0.959951
vt 0.200749 0.959899
vt 0.208078 0.943552
vt 0.211273 0.942487
vt 0.189093 0.953532
vt 0.207813 0.951776
vt 0.205738 0.958979
vt 0.201000 0.956725
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.8174 0.5112 0.2656
vn -0.8079 0.5276 0.2625
vn 0.5260 0.4462 -0.7240
vn 0.0000 0.5569 0.8306
vn -0.5226 0.4577 -0.7193
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
vn 0.8132 0.5186 0.2642
vn -0.8073 0.5287 0.2623
vn 0.5157 0.4797 -0.7098
vn 0.0000 0.5471 0.8371
vn -0.5135 0.4865 -0.7068
vn 0.6184 0.5307 0.5796
vn -0.8419 0.5292 -0.1056
vn 0.7441 0.5274 -0.4100
vn -0.3599 0.5317 0.7667
vn -0.1601 0.5265 -0.8350
vn 0.3820 0.3459 0.8570
vn -0.7929 0.4027 -0.4574
vn 0.9125 0.3977 -0.0963
vn -0.6961 0.3493 0.6273
vn 0.1873 0.4309 -0.8827
vn -0.6392 0.3378 0.6909
vn 0.1038 0.4749 -0.8739
vn 0.4590 0.3409 0.8204
vn -0.8223 0.4241 -0.3795
vn 0.8862 0.4286 -0.1759
vn -0.5631 0.4674 0.6815
vn 0.1291 0.6349 -0.7618
vn 0.4485 0.3927 0.8029
vn -0.7236 0.6181 -0.3071
vn 0.8534 0.5078 -0.1176
vn -0.0560 -0.9950 -0.0830
vn -0.0559 -0.9950 -0.0830
vn -0.0560 -0.9950 -0.0831
usemtl Material.001
s off
f 2/1/1 3/2/1 1/3/1
f 4/4/2 7/5/2 3/6/2
f 8/7/3 5/8/3 7/9/3
f 6/10/4 1/11/4 5/12/4
f 13/13/5 17/14/5 12/15/5
f 10/16/6 16/17/6 15/18/6
f 9/19/7 18/20/7 13/21/7
f 12/22/8 16/23/8 11/24/8
f 9/19/9 15/25/9 14/26/9
f 13/27/10 12/28/10 9/29/10
f 14/30/11 15/31/11 16/32/11
f 17/33/11 14/30/11 16/32/11
f 17/33/11 18/34/11 14/30/11
f 23/35/12 27/36/12 22/37/12
f 12/28/10 11/38/10 10/39/10
f 12/28/10 10/39/10 9/29/10
f 20/40/13 26/41/13 25/42/13
f 19/43/14 28/44/14 23/45/14
f 22/46/15 26/47/15 21/48/15
f 19/43/16 25/49/16 24/50/16
f 23/51/10 22/52/10 19/53/10
f 24/54/11 25/55/11 26/56/11
f 27/57/11 24/54/11 26/56/11
f 27/57/11 28/58/11 24/54/11
f 22/52/10 21/59/10 20/60/10
f 22/52/10 20/60/10 19/53/10
f 33/61/17 37/62/17 32/63/17
f 30/64/18 36/65/18 35/66/18
f 29/67/19 38/68/19 33/69/19
f 31/70/20 37/62/20 36/71/20
f 29/72/21 35/73/21 34/74/21
f 33/75/10 32/76/10 29/77/10
f 34/78/11 35/79/11 36/80/11
f 37/81/11 34/78/11 36/80/11
f 37/81/11 38/82/11 34/78/11
f 32/76/10 31/83/10 30/84/10
f 32/76/10 30/84/10 29/77/10
f 42/85/22 48/86/22 47/87/22
f 41/88/23 45/89/23 40/90/23
f 43/91/24 44/92/24 48/93/24
f 42/94/25 46/95/25 41/88/25
f 39/96/26 45/97/26 44/98/26
f 43/99/10 42/100/10 39/101/10
f 44/102/11 45/103/11 46/104/11
f 47/105/11 44/102/11 46/104/11
f 47/105/11 48/106/11 44/102/11
f 42/100/10 41/107/10 40/108/10
f 42/100/10 40/108/10 39/101/10
f 53/109/27 57/110/27 52/111/27
f 51/112/28 55/113/28 50/114/28
f 53/115/29 54/116/29 58/117/29
f 52/111/30 56/118/30 51/119/30
f 49/120/31 55/121/31 54/122/31
f 53/123/10 52/124/10 49/125/10
f 54/126/11 55/127/11 56/128/11
f 57/129/11 54/126/11 56/128/11
f 57/129/11 58/130/11 54/126/11
f 52/124/10 51/131/10 50/132/10
f 52/124/10 50/132/10 49/125/10
f 62/133/32 63/134/32 64/135/32
f 60/136/33 61/137/33 64/138/33
f 63/139/34 59/140/34 64/141/34
f 61/142/35 62/133/35 64/135/35
f 59/143/36 60/144/36 64/145/36
f 63/146/37 62/147/37 59/148/37
f 62/147/38 61/149/38 60/150/38
f 62/147/39 60/150/39 59/148/39
f 2/1/1 4/151/1 3/2/1
f 4/4/2 8/152/2 7/5/2
f 8/7/3 6/153/3 5/8/3
f 6/10/4 2/154/4 1/11/4
f 13/13/5 18/155/5 17/14/5
f 10/16/6 11/156/6 16/17/6
f 9/19/7 14/26/7 18/20/7
f 12/22/8 17/157/8 16/23/8
f 9/19/9 10/158/9 15/25/9
f 23/35/12 28/159/12 27/36/12
f 20/40/13 21/160/13 26/41/13
f 19/43/14 24/50/14 28/44/14
f 22/46/15 27/161/15 26/47/15
f 19/43/16 20/162/16 25/49/16
f 33/61/17 38/163/17 37/62/17
f 30/64/18 31/164/18 36/65/18
f 29/67/19 34/165/19 38/68/19
f 31/70/20 32/63/20 37/62/20
f 29/72/21 30/166/21 35/73/21
f 42/85/22 43/167/22 48/86/22
f 41/88/23 46/95/23 45/89/23
f 43/91/24 39/168/24 44/92/24
f 42/94/25 47/169/25 46/95/25
f 39/96/26 40/170/26 45/97/26
f 53/109/27 58/171/27 57/110/27
f 51/112/28 56/172/28 55/113/28
f 53/115/29 49/173/29 54/116/29
f 52/111/30 57/110/30 56/118/30
f 49/120/31 50/174/31 55/121/31

A data/gfx/tree.png => data/gfx/tree.png +0 -0

M data/shaders/pixelizer.fs => data/shaders/pixelizer.fs +2 -2
@@ 17,8 17,8 @@ out vec4 finalColor;
const float renderWidth = 1280;
const float renderHeight = 720;

uniform float pixelWidth = 1.5;
uniform float pixelHeight = 1.5;
uniform float pixelWidth = 1.2;
uniform float pixelHeight = 1.2;

void main()
{

M data/test.json => data/test.json +30 -0
@@ 79,6 79,36 @@
    ],
    [
        {
            "diffusePath": "data/gfx/tree.png",
            "modelPath": "data/gfx/tree.obj",
            "scale": 1.5,
            "type": "MeshRenderer"
        },
        {
            "angle": -130.0,
            "posX": 8.0,
            "posY": 0.0,
            "posZ": 0.0,
            "type": "Transform"
        }
    ],
    [
        {
            "diffusePath": "data/gfx/tree.png",
            "modelPath": "data/gfx/tree.obj",
            "scale": 2,
            "type": "MeshRenderer"
        },
        {
            "angle": 100.0,
            "posX": 8.0,
            "posY": 0.0,
            "posZ": 13.0,
            "type": "Transform"
        }
    ],
    [
        {
            "diffusePath": "data/gfx/Wood.dds",
            "modelPath": "data/gfx/lyingTrunk.obj",
            "scale": 2,