Skip to content

Commit

Permalink
Change in raytracing scene and bloom pass
Browse files Browse the repository at this point in the history
  • Loading branch information
AEspinosaDev committed Dec 8, 2024
1 parent 6efd01e commit 3106c9a
Show file tree
Hide file tree
Showing 13 changed files with 171,439 additions and 145 deletions.
15 changes: 9 additions & 6 deletions examples/raytracing/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,21 @@ void Application::setup() {
Tools::Loaders::load_texture(droidText2, TEXTURE_PATH + "DROID_Body_Normal.jpg", TEXTURE_FORMAT_TYPE_NORMAL);
droidMat->set_normal_texture(droidText2);
droidMesh->push_material(droidMat);
auto droidMat1 = new PhysicallyBasedMaterial();
Texture* droidText10 = new Texture();
Tools::Loaders::load_texture(droidText10, TEXTURE_PATH + "DROID_Misc_Emissive.jpg");
droidMat1->set_emissive_texture(droidText0);
droidMesh->push_material(droidMat1);
// droidMesh->set_material_ID(0, 1);
droidMesh->set_name("Droid");
droidMesh->set_position({-0.7f, -2.3f, -1.6f});
droidMesh->set_rotation({0.0, -136.0f, 0.0f});
droidMesh->set_scale(.7f);
Mesh* eyesMesh = new Mesh();
Tools::Loaders::load_3D_file(eyesMesh, MESH_PATH + "eyes.obj", false);
auto droidMat1 = new PhysicallyBasedMaterial();
droidMat1->set_emissive_color(Vec3(1.0));
droidMat1->set_emission_intensity(10.0);
eyesMesh->push_material(droidMat1);
eyesMesh->set_name("Eyes");
droidMesh->add_child(eyesMesh);
m_scene->add(droidMesh);


m_scene->add(plane);

m_scene->set_ambient_color({0.2, 0.25, 0.61});
Expand Down
95 changes: 4 additions & 91 deletions examples/resources/meshes/droid2.obj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 3ds Max Wavefront OBJ Exporter v0.99 - (c)2007 guruware
# File Created: 06.12.2024 12:02:53
# File Created: 08.12.2024 15:34:30

#
# object Droide_de_seguridad_Star_Wars_KX
Expand Down Expand Up @@ -9550,7 +9550,7 @@ v 0.3567 2.7818 0.0020
v 0.3443 2.8391 0.0190
v 0.3266 2.7890 -0.0197
v 0.3220 2.8452 0.0015
v 0.1847 2.7669 0.0000
v 0.1847 2.7669 -0.0000
v 0.1934 2.7416 0.0338
v 0.1936 2.7004 0.0304
v 0.1846 2.8023 -0.0384
Expand Down Expand Up @@ -12318,7 +12318,7 @@ v 0.0020 3.4943 -0.0190
v 0.0012 3.4820 -0.0197
v 0.0025 3.4949 -0.0274
v 0.0065 3.4956 -0.0256
v -0.0000 3.4740 -0.0267
v 0.0000 3.4740 -0.0267
v 0.0100 3.4959 -0.0292
v 0.0021 3.4651 -0.0338
v 0.0084 3.4954 -0.0335
Expand Down Expand Up @@ -18042,7 +18042,7 @@ vn 0.1913 -0.1975 -0.9615
vn 0.1902 -0.1399 -0.9717
vn 0.2122 -0.1423 -0.9668
vn -0.0089 -0.9958 -0.0909
vn -0.0000 -0.9960 -0.0891
vn 0.0000 -0.9960 -0.0891
vn -0.0002 -0.9961 -0.0880
vn -0.0128 -0.9951 -0.0983
vn -0.0721 -0.9888 -0.1308
Expand Down Expand Up @@ -111560,90 +111560,3 @@ f 20155/25608/28834 20195/25610/28874 20154/25607/28833
f 20194/25615/28873 20158/25614/28837 20195/25610/28874
# 6232 faces

#
# object Object002
#

v 0.0737 3.6297 0.7688
v 0.0436 3.6250 0.7664
v 0.0723 3.6145 0.7647
v 0.0671 3.6437 0.7723
v 0.0632 3.6021 0.7611
v 0.0541 3.6526 0.7742
v 0.0488 3.5958 0.7588
v 0.0384 3.6542 0.7740
v 0.0330 3.5973 0.7586
v 0.0240 3.6479 0.7718
v 0.0201 3.6063 0.7605
v 0.0149 3.6355 0.7681
v 0.0134 3.6202 0.7640
v -0.1408 3.5820 0.7431
v -0.1174 3.6004 0.7501
v -0.1474 3.5960 0.7464
v -0.1460 3.6112 0.7507
v -0.1279 3.5730 0.7417
v -0.1369 3.6235 0.7548
v -0.1121 3.5712 0.7425
v -0.1226 3.6296 0.7577
v -0.0978 3.5774 0.7454
v -0.1069 3.6279 0.7585
v -0.0887 3.5897 0.7495
v -0.0939 3.6189 0.7571
v -0.0873 3.6049 0.7538
# 26 vertices

vn -0.0365 -0.2575 0.9656
vn -0.0365 -0.2576 0.9656
vn -0.0365 -0.2574 0.9656
vn -0.0364 -0.2575 0.9656
vn -0.0794 -0.2641 0.9612
vn -0.0794 -0.2640 0.9612
vn -0.0794 -0.2640 0.9613
vn -0.0795 -0.2640 0.9612
vn -0.0793 -0.2640 0.9612
vn -0.0793 -0.2641 0.9612
# 10 vertex normals

vt 0.6797 0.8697 0.0000
vt 0.5508 0.8674 0.0000
vt 0.6602 0.9341 0.0000
vt 0.6641 0.8047 0.0000
vt 0.6133 0.9806 0.0000
vt 0.6172 0.7565 0.0000
vt 0.5469 0.9968 0.0000
vt 0.5527 0.7380 0.0000
vt 0.4844 0.9784 0.0000
vt 0.4883 0.7542 0.0000
vt 0.4375 0.9302 0.0000
vt 0.4395 0.8007 0.0000
vt 0.4199 0.8651 0.0000
# 13 texture coords

o Object002
g Object002
f 20196/25650/28875 20197/25651/28875 20198/25652/28876
f 20199/25653/28877 20197/25651/28875 20196/25650/28875
f 20198/25652/28876 20197/25651/28875 20200/25654/28878
f 20201/25655/28875 20197/25651/28875 20199/25653/28877
f 20200/25654/28878 20197/25651/28875 20202/25656/28875
f 20203/25657/28875 20197/25651/28875 20201/25655/28875
f 20202/25656/28875 20197/25651/28875 20204/25658/28875
f 20205/25659/28878 20197/25651/28875 20203/25657/28875
f 20204/25658/28875 20197/25651/28875 20206/25660/28875
f 20207/25661/28876 20197/25651/28875 20205/25659/28878
f 20206/25660/28875 20197/25651/28875 20208/25662/28876
f 20208/25662/28876 20197/25651/28875 20207/25661/28876
f 20209/25652/28879 20210/25651/28880 20211/25650/28879
f 20211/25650/28879 20210/25651/28880 20212/25653/28881
f 20213/25654/28882 20210/25651/28880 20209/25652/28879
f 20212/25653/28881 20210/25651/28880 20214/25655/28880
f 20215/25656/28880 20210/25651/28880 20213/25654/28882
f 20214/25655/28880 20210/25651/28880 20216/25657/28880
f 20217/25658/28883 20210/25651/28880 20215/25656/28880
f 20216/25657/28880 20210/25651/28880 20218/25659/28882
f 20219/25660/28880 20210/25651/28880 20217/25658/28883
f 20218/25659/28882 20210/25651/28880 20220/25661/28879
f 20220/25661/28879 20210/25651/28880 20221/25662/28884
f 20221/25662/28884 20210/25651/28880 20219/25660/28880
# 24 faces

90 changes: 90 additions & 0 deletions examples/resources/meshes/eyes.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# 3ds Max Wavefront OBJ Exporter v0.99 - (c)2007 guruware
# File Created: 08.12.2024 15:25:12

#
# object Object002
#

v 0.0737 3.6297 0.7688
v 0.0436 3.6250 0.7664
v 0.0723 3.6145 0.7647
v 0.0671 3.6437 0.7723
v 0.0632 3.6021 0.7611
v 0.0541 3.6526 0.7742
v 0.0488 3.5958 0.7588
v 0.0384 3.6542 0.7740
v 0.0330 3.5973 0.7586
v 0.0240 3.6479 0.7718
v 0.0201 3.6063 0.7605
v 0.0149 3.6355 0.7681
v 0.0134 3.6202 0.7640
v -0.1408 3.5820 0.7431
v -0.1174 3.6004 0.7501
v -0.1474 3.5960 0.7464
v -0.1460 3.6112 0.7507
v -0.1279 3.5730 0.7417
v -0.1369 3.6235 0.7548
v -0.1121 3.5712 0.7425
v -0.1226 3.6296 0.7577
v -0.0978 3.5774 0.7454
v -0.1069 3.6279 0.7585
v -0.0887 3.5897 0.7495
v -0.0939 3.6189 0.7571
v -0.0873 3.6049 0.7538
# 26 vertices

vn -0.0365 -0.2575 0.9656
vn -0.0365 -0.2576 0.9656
vn -0.0365 -0.2574 0.9656
vn -0.0364 -0.2575 0.9656
vn -0.0794 -0.2641 0.9612
vn -0.0794 -0.2640 0.9612
vn -0.0794 -0.2640 0.9613
vn -0.0795 -0.2640 0.9612
vn -0.0793 -0.2640 0.9612
vn -0.0793 -0.2641 0.9612
# 10 vertex normals

vt 0.6797 0.8697 0.0000
vt 0.5508 0.8674 0.0000
vt 0.6602 0.9341 0.0000
vt 0.6641 0.8047 0.0000
vt 0.6133 0.9806 0.0000
vt 0.6172 0.7565 0.0000
vt 0.5469 0.9968 0.0000
vt 0.5527 0.7380 0.0000
vt 0.4844 0.9784 0.0000
vt 0.4883 0.7542 0.0000
vt 0.4375 0.9302 0.0000
vt 0.4395 0.8007 0.0000
vt 0.4199 0.8651 0.0000
# 13 texture coords

o Object002
g Object002
f 1/1/1 2/2/1 3/3/2
f 4/4/3 2/2/1 1/1/1
f 3/3/2 2/2/1 5/5/4
f 6/6/1 2/2/1 4/4/3
f 5/5/4 2/2/1 7/7/1
f 8/8/1 2/2/1 6/6/1
f 7/7/1 2/2/1 9/9/1
f 10/10/4 2/2/1 8/8/1
f 9/9/1 2/2/1 11/11/1
f 12/12/2 2/2/1 10/10/4
f 11/11/1 2/2/1 13/13/2
f 13/13/2 2/2/1 12/12/2
f 14/3/5 15/2/6 16/1/5
f 16/1/5 15/2/6 17/4/7
f 18/5/8 15/2/6 14/3/5
f 17/4/7 15/2/6 19/6/6
f 20/7/6 15/2/6 18/5/8
f 19/6/6 15/2/6 21/8/6
f 22/9/9 15/2/6 20/7/6
f 21/8/6 15/2/6 23/10/8
f 24/11/6 15/2/6 22/9/9
f 23/10/8 15/2/6 25/12/5
f 25/12/5 15/2/6 26/13/10
f 26/13/10 15/2/6 24/11/6
# 24 faces

Loading

0 comments on commit 3106c9a

Please sign in to comment.