From: LockedLunatic Date: Tue, 28 Jun 2016 07:15:06 +0000 (+0200) Subject: Point light relocated X-Git-Url: https://git.leopard-lacewing.eu/?a=commitdiff_plain;h=2ad7c231e3c9f1016d8f6b9d00b3a88955579d31;p=cgue_weave.git Point light relocated document updated minor level changes pressing ESC once pauses the game without exiting it --- diff --git a/Weave/Stage.cpp b/Weave/Stage.cpp index 37bd9d9..71d84ae 100644 --- a/Weave/Stage.cpp +++ b/Weave/Stage.cpp @@ -117,6 +117,7 @@ Stage::Stage(int num) tmp_world = new Level("level_2", "model_levelTest_2D.jpg"); current_world->addObject(tmp_world); + //Player tmp_playerObject = new Marvin(translate(vec3(-5.38658f, 0.73429f, 30.24083f))*rotate((float)M_PI_4, vec3(0.f, 1.f, 0.f))); @@ -124,21 +125,6 @@ Stage::Stage(int num) current_world->setLookAt(tmp_playerObject); - lever1 = new Lever(translate(vec3(2.55167f, 2.51451f, -5.54817f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "lever", "model_lever_2D.png"); - current_world->addObject(lever1); - lever1->setAnimationLoop(false); - - - door1 = new Door(translate(vec3(-9.78039f, -1.06029f, -6.46377f)) * rotate(1.5708f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Door", "model_door_2D.png"); - current_world->addObject(door1); - door1->setup(1.5708f, vec3(0, 1, 0), 1); - lever1->setup(door1); - door2 = new Door(translate(vec3(-2.58412f, -1.06029f, -6.46377f)) * rotate(-1.5708f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Door", "model_door_2D.png"); - current_world->addObject(door2); - door2->setup(-1.5708f, vec3(0, 1, 0), 1); - lever1->setup(door2); - - current_world->addObject(new Level(translate(vec3(-5.50806f, 0.91084f, 19.01143f)) * rotate(-1.57f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Log", "model_levelTest_2D.png")); current_world->addObject(new Level(translate(vec3(-5.50806f, -0.52355f, 7.75976f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Log", "model_levelTest_2D.png")); current_world->addObject(new Level(translate(vec3(3.0515f, -1.3978f, -3.00258f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png")); @@ -157,6 +143,21 @@ Stage::Stage(int num) current_world->addObject(new Boar(translate(vec3(23.64995f, 0.1f, -2.53362f)) * rotate(1.9f, vec3(0, 1, 0)))); current_world->addObject(new Boar(translate(vec3(16.71088f, 0.1f, 0.83976f)) * rotate(-1.6f, vec3(0, 1, 0)))); + + lever1 = new Lever(translate(vec3(2.55167f, 2.51451f, -5.54817f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "lever", "model_lever_2D.png"); + current_world->addObject(lever1); + lever1->setAnimationLoop(false); + + + door1 = new Door(translate(vec3(-9.78039f, -1.06029f, -6.46377f)) * rotate(1.5708f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Door", "model_door_2D.png"); + current_world->addObject(door1); + door1->setup(1.5708f, vec3(0, 1, 0), 1); + lever1->setup(door1); + door2 = new Door(translate(vec3(-2.58412f, -1.06029f, -6.46377f)) * rotate(-1.5708f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Door", "model_door_2D.png"); + current_world->addObject(door2); + door2->setup(-1.5708f, vec3(0, 1, 0), 1); + lever1->setup(door2); + for (int i = -9; i < -2; i++) { for (int j = -1; j < 3; j++) @@ -174,6 +175,7 @@ Stage::Stage(int num) tmp_world = new Level("level_3", "model_levelTest_2D.jpg"); current_world->addObject(tmp_world); + //Player tmp_playerObject = new Marvin(translate(vec3(0.f, 0.73429f, 0.f))); @@ -181,6 +183,12 @@ Stage::Stage(int num) current_world->setLookAt(tmp_playerObject); + current_world->addObject(new Boar(translate(vec3(-7.14729f, 0.1f, -3.08567f)) * rotate(1.5f, vec3(0, 1, 0)))); + current_world->addObject(new Boar(translate(vec3(13.32701f, 0.1f, -2.53362f)) * rotate(1.8f, vec3(0, 1, 0)))); + current_world->addObject(new Boar(translate(vec3(23.64995f, 0.1f, -2.53362f)) * rotate(1.9f, vec3(0, 1, 0)))); + current_world->addObject(new Boar(translate(vec3(16.71088f, 0.1f, 0.83976f)) * rotate(-1.6f, vec3(0, 1, 0)))); + + lever1 = new Lever(translate(vec3(2.55167f, 2.51451f, -5.54817f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "lever", "model_lever_2D.png"); current_world->addObject(lever1); lever1->setAnimationLoop(false); @@ -196,23 +204,7 @@ Stage::Stage(int num) lever1->setup(door2); - current_world->addObject(new Level(translate(vec3(-5.50806f, 0.91084f, 19.01143f)) * rotate(-1.57f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Log", "model_levelTest_2D.png")); - current_world->addObject(new Level(translate(vec3(-5.50806f, -0.52355f, 7.75976f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Log", "model_levelTest_2D.png")); - current_world->addObject(new Level(translate(vec3(3.0515f, -1.3978f, -3.00258f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png")); - current_world->addObject(new Level(translate(vec3(3.0515f, -1.3978f, -6.02786f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png")); - current_world->addObject(new Level(translate(vec3(10.0674f, -1.3978f, -1.83059f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png")); - current_world->addObject(new Level(translate(vec3(10.02701f, -1.3978f, 1.3517f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png")); - current_world->addObject(new Level(translate(vec3(16.17073f, -1.46596f, -5.34347f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png")); - current_world->addObject(new Level(translate(vec3(21.94122f, -1.36633f, 2.71334f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png")); - current_world->addObject(new Level(translate(vec3(30.17974f, -3.34705f, -2.16098f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "boulder", "model_levelTest_2D.png")); - current_world->addObject(new Level(translate(vec3(18.57976f, 2.46041f, -1.78333f)) * rotate(0.51f, vec3(0, 1, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Log", "model_levelTest_2D.png")); - current_world->addObject(new Level(translate(vec3(26.31248f, 1.66742f, 0.82817f)) * rotate(-0.95f, vec3(0, 1, 0)) * rotate(-0.35f, vec3(1, 0, 0)), vec4(3.0f, 3.f, 0.4f, 1.5f), "Log", "model_levelTest_2D.png")); - - current_world->addObject(new Boar(translate(vec3(-7.14729f, 0.1f, -3.08567f)) * rotate(1.5f, vec3(0, 1, 0)))); - current_world->addObject(new Boar(translate(vec3(13.32701f, 0.1f, -2.53362f)) * rotate(1.8f, vec3(0, 1, 0)))); - current_world->addObject(new Boar(translate(vec3(23.64995f, 0.1f, -2.53362f)) * rotate(1.9f, vec3(0, 1, 0)))); - current_world->addObject(new Boar(translate(vec3(16.71088f, 0.1f, 0.83976f)) * rotate(-1.6f, vec3(0, 1, 0)))); break; } } diff --git a/Weave/main.cpp b/Weave/main.cpp index 7a19976..8debe44 100644 --- a/Weave/main.cpp +++ b/Weave/main.cpp @@ -60,6 +60,9 @@ int main(int argc, char *argv[]) Stage spiel1(level); spiel1.play(); + + if (Events::halt == 1) + Events::halt = false; } Events::processEvents(); if (Events::halt == 1) diff --git a/doc/Weave.tex b/doc/Weave.tex index fd1b459..fb0ae97 100644 --- a/doc/Weave.tex +++ b/doc/Weave.tex @@ -22,7 +22,8 @@ This was realised by using the GLM. Transform functions to create model,view and \subsection{Moving objects} -The player is freely movable through the world by using WASD and Space or the left mouse button for jumping. +The player is freely movable through the world by using WASD and Space or the left mouse button for jumping.\\ +Turning levers will open doors. \subsection{Texture Mapping} @@ -31,29 +32,64 @@ Models are made with Blender and their .dae files which include their UVs (as we Materials are saved as Vectors with 4 entries: The intensities for the 3 different light source types and one for the glossiness. \subsection{Simple lighting and materials} -There is one point-lightsource, one ambient light source and one directional light source. All of their positions / directions and intensities are currently hardcoded into the shader files. +There is one point-lightsource, one ambient light source and one directional light source.\\ +The ambient and directional lights are programmed dynamically and can be adjusted. There is one point-light hardcoded into the shader files. It is located near the lever in the first level.\\ +Only the directional light casts shadows. \subsection{Controls} -The camera can be controlled with the mouse. -You can control the player with the WASD Keys and jump with Space or the left mouse button. -If you hold the shift-key you can reverse time, meaning that if you jump down somewhere you can get back up by rewinding time until you're back to before you jumped. -Pressing F3 toggles Wire Frames. -Pressing F6 makes the Bounding Meshes and Event Boxes visible. +The camera can be controlled with the mouse.\\ +You can control the player with the WASD Keys and jump with Space or the left mouse button.\\ +Levers can be pressed with the E key.\\ +If you hold the shift-key you can reverse time, meaning that if you jump down somewhere you can get back up by rewinding time until you're back to before you jumped.\\ +Pressing F2 shows the frames per second in the window name.\\ +Pressing F3 toggles Wire Frames.\\ +Pressing F4 toggles the texture sampling quality.\\ +Pressing F5 cycles through the Mip Mapping qualities.\\ +Pressing F6 makes the Bounding Meshes and Event Boxes visible.\\ +Pressing F8 toggles frustum culling on and off.\\ +Pressing F9 toggles transparency on and off (the doors are partly transparent at the top).\\ You can exit by pressing ESC twice and you can restart the level by pressing ESC and then R. \subsection{Basic Gameplay} The player can move around the world and jump around. Collisions work properly and you can stand on ground and all that good stuff. -Colliding with the duck or the lever doesn't do anything (it is registered, but no effect is implemented). -Colliding with the event box triggers text in the console to appear and disables controls. +Colliding with the boar will lose the game. This can be reverted by turning back time. Levers can be turned by pressing E. +Green glowing objects can't be reverted back in time. +Colliding with the win-box loads the next level. +There are currently two levels. + + +\subsection{Effects} +Shadow Mapping with PCF (1.5 points). This is only done on the directional light but not on the pointlights.\\ +Motion Blur (1.5 points) when turning back time.\\ +Bloom (1 point): There is always a bit of bloom active, but there are also special green glowing objects in the second level that can't be turned back in time. + + +\subsection{Complex Objects} +We have several complex objects like the player, the level and the boulders.\\ + + +\subsection{Animated Objects} +The player has a move animation. All other moving objects are simple transformations (like doors opening and levers turning). + + +\subsection{Frustum Culling} +This is realized with Bounding Spheres. + + +\subsection{Transparency} +The top of the doors are transparent. + + +\subsection{Experimenting with OpenGL} +VBOs, VAOs, FBOs, Mip Mapping and Texture Sampling has all been implemented. \section{Features} -Pressing F2 writes the FPS in the console. -Pressing F3 toggles Wire Frames. -Pressing F6 makes the Bounding Boxes and Event Boxes visible. -Pressing F10 toggles transparency. -Collisions with the Duck and with Event Boxes trigger messages in the console. -There is currently one Event Box that makes you lose the game and one that makes you win. +Colliding with any of the boars will lose you the game and turn the screen red-brown.\\ +You can also jump on the to kill them.\\ +There are two levels. Winning the first one will transport you to the second one. +The second one doesn't have a win condition implemented, but the goal is to open and free all boars. +In order to do that you have to solve puzzles. \section{Illuminated Objects} There are multiple complex objects, all of which have textures and are illuminated. diff --git a/models/level_3.blend b/models/level_3.blend index 7ac4c41..e8311a4 100644 Binary files a/models/level_3.blend and b/models/level_3.blend differ diff --git a/models/level_3.blend1 b/models/level_3.blend1 index a1e5b2a..28ee2ce 100644 Binary files a/models/level_3.blend1 and b/models/level_3.blend1 differ diff --git a/models/level_3.dae b/models/level_3.dae index ae4ddf4..b162ec1 100644 --- a/models/level_3.dae +++ b/models/level_3.dae @@ -5,8 +5,8 @@ Blender User Blender 2.77.0 commit date:2016-04-05, commit time:18:12, hash:abf6f08 - 2016-06-28T07:07:42 - 2016-06-28T07:07:42 + 2016-06-28T08:19:14 + 2016-06-28T08:19:14 Z_UP @@ -101,9 +101,9 @@ - -18.11115 14.31878 5.861037 16.74848 14.38196 5.863757 -18.14698 -9.259619 5.861035 16.74848 -9.276388 5.863758 -18.1196 -5.811701 14.22825 16.74848 -5.811701 14.22825 -18.1196 2.552788 17.69293 16.74848 2.552788 17.69293 -18.1196 10.91728 14.22825 16.74848 10.91728 14.22825 -18.11115 14.31878 -5.861034 16.75472 14.31462 -5.861034 16.75312 -9.252387 -5.861037 -18.14698 -9.259619 -5.861037 + -18.11115 14.31878 5.861037 16.74848 14.38196 5.863757 -18.14698 -9.259619 5.861035 16.74848 -9.276388 5.863758 -18.1196 -5.811701 14.22825 16.74848 -5.811701 14.22825 -18.1196 2.552788 17.69293 16.74848 2.552788 17.69293 -18.1196 10.91728 14.22825 16.74848 10.91728 14.22825 -18.11115 14.31878 -5.861034 16.75472 14.31462 -5.861034 16.75312 -9.252387 -5.861037 -18.14698 -9.259619 -5.861037 16.74848 -1.39027 6.585386 16.74848 6.495846 6.585386 16.75419 6.458951 -5.861035 16.75365 -1.396718 -5.861036 - + @@ -111,9 +111,9 @@ - -4.74004e-4 -0.9245765 0.3809964 0 -0.3826835 0.9238796 0 0.3826835 0.9238796 0 0.9263767 0.3765984 -0.001812338 0.9999985 0 -0.9999989 0.001519501 0 -4.80534e-4 -1 0 0.9999999 0 5.3244e-4 1 0 0 -0.9999992 -5.02838e-4 -0.001214861 0 -0.9238795 0.3826835 0 -0.3826833 0.9238796 0 0.3826833 0.9238796 -0.001704275 0.9238783 0.3826829 1.1942e-4 0.9999836 -0.005743503 -0.9999989 0.001519501 0 2.07239e-4 -0.9999979 -0.002047061 1 -6.7991e-5 3.9549e-4 1 -5.26522e-7 0 1 -1.54215e-7 0 -0.9999954 0.001519441 0.002645432 -0.9999999 2.09444e-4 -5.06022e-4 + -4.74004e-4 -0.9245765 0.3809964 0 -0.3826835 0.9238796 0 0.3826835 0.9238796 0 0.9263767 0.3765984 -0.001812338 0.9999985 0 -0.9999989 0.001519501 0 -4.80534e-4 -1 0 1 4.16319e-5 4.58537e-4 1 -1.92546e-7 0 -0.9999992 -5.02838e-4 -0.001214861 1 -3.79335e-5 4.15619e-4 0 -0.9238795 0.3826835 0 -0.3826833 0.9238796 0 0.3826833 0.9238796 -0.001704275 0.9238783 0.3826829 1.1942e-4 0.9999836 -0.005743503 -0.9999989 0.001519501 0 2.07239e-4 -0.9999979 -0.002047061 0.9999999 -6.75915e-5 5.32831e-4 1 0 0 1 -4.80871e-7 0 -0.9999954 0.001519441 0.002645432 -0.9999999 2.09444e-4 -5.06022e-4 1 -6.80963e-5 3.9549e-4 - + @@ -121,9 +121,9 @@ - 0.7294408 0.4026927 0.5565676 0.9981268 0.7294406 0.9986009 0.5565556 0.402686 0.4585115 0.9980884 0.5565676 0.9981268 1 0.4027057 0.9022533 0.9980995 1 0.9981465 0.9022532 0.4026588 0.7296274 0.9979444 0.9022533 0.9980995 0.448051 0.9993818 0.2242982 0.4040126 0.448051 0.4040852 0.4584999 0.4026477 0.6866806 0 0.6866807 0.4026477 0.2239893 0.4040126 0 0.9999269 1.42582e-4 0.4040188 0.2302656 0 0.4584997 0.4028625 0.2302658 0.4040126 0.2302656 0 0.06744325 0.3448463 0 0.2020063 0.9169994 0.2017202 0.8495561 0.3445602 0.6866807 0.4026477 0.7294408 0.4026927 0.5565556 0.402686 0.5565676 0.9981268 0.5565556 0.402686 0.4584997 0.4026477 0.4585115 0.9980884 1 0.4027057 0.9022532 0.4026588 0.9022533 0.9980995 0.9022532 0.4026588 0.7294408 0.4026477 0.7296274 0.9979444 0.448051 0.9993818 0.2239893 0.9994155 0.2242982 0.4040126 0.4584999 0.4026477 0.4584997 0 0.6866806 0 0.2239893 0.4040126 0.2239893 1 0 0.9999269 0.2302656 0 0.4584996 4.09817e-4 0.4584997 0.4028625 0 0.2020063 0.06744319 0.05916631 0.2302656 0 0.2302656 0 0.2302658 0.4040126 0.06744325 0.3448463 0.6866807 0.4026477 0.6866806 0 0.8495563 0.05888038 0.8495563 0.05888038 0.9169994 0.2017202 0.6866807 0.4026477 + 0.7294408 0.4026927 0.5565676 0.9981268 0.7294406 0.9986009 0.5565556 0.402686 0.4585115 0.9980884 0.5565676 0.9981268 1 0.4027057 0.9022533 0.9980995 1 0.9981465 0.9022532 0.4026588 0.7296274 0.9979444 0.9022533 0.9980995 0.448051 0.9993818 0.2242982 0.4040126 0.448051 0.4040852 0.4584999 0.4026477 0.6866806 0 0.6866807 0.4026477 0.2239893 0.4040126 0 0.9999269 1.42582e-4 0.4040188 0.4584996 0.2687116 0.2302658 0.4040126 0.2302657 0.2693417 0.2302657 0.2693417 0.06744325 0.3448463 0 0.2020063 0.9169994 0.2017202 0.8495561 0.3445602 0.6866807 0.4026477 0.2302656 0 0.4584996 0.1345607 0.2302657 0.1346709 0.7294408 0.4026927 0.5565556 0.402686 0.5565676 0.9981268 0.5565556 0.402686 0.4584997 0.4026477 0.4585115 0.9980884 1 0.4027057 0.9022532 0.4026588 0.9022533 0.9980995 0.9022532 0.4026588 0.7294408 0.4026477 0.7296274 0.9979444 0.448051 0.9993818 0.2239893 0.9994155 0.2242982 0.4040126 0.4584999 0.4026477 0.4584997 0 0.6866806 0 0.2239893 0.4040126 0.2239893 1 0 0.9999269 0.4584996 0.2687116 0.4584997 0.4028625 0.2302658 0.4040126 0 0.2020063 0.06744319 0.05916631 0.2302657 0.1346709 0.06744319 0.05916631 0.2302656 0 0.2302657 0.1346709 0.2302658 0.4040126 0.06744325 0.3448463 0.2302657 0.2693417 0 0.2020063 0.2302657 0.1346709 0.2302657 0.2693417 0.6866807 0.4026477 0.6866806 0 0.8495563 0.05888038 0.8495563 0.05888038 0.9169994 0.2017202 0.6866807 0.4026477 0.2302656 0 0.4584996 4.09817e-4 0.4584996 0.1345607 - + @@ -132,12 +132,12 @@ - + - 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 -

3 0 0 4 0 1 2 0 2 5 1 3 6 1 4 4 1 5 7 2 6 8 2 7 6 2 8 9 3 9 0 3 10 8 3 11 1 4 12 10 4 13 0 4 14 10 5 15 2 5 16 0 5 17 13 6 18 3 6 19 2 6 20 3 7 21 11 7 22 1 7 23 3 8 24 9 8 25 7 8 26 6 9 27 8 9 28 0 9 29 3 10 30 5 10 31 4 10 32 5 11 33 7 11 34 6 11 35 7 12 36 9 12 37 8 12 38 9 13 39 1 13 40 0 13 41 1 14 42 11 14 43 10 14 44 10 15 45 13 15 46 2 15 47 13 16 48 12 16 49 3 16 50 3 17 51 12 17 52 11 17 53 7 18 54 5 18 55 3 18 56 3 19 57 1 19 58 9 19 59 0 20 60 2 20 61 4 20 62 4 21 63 6 21 64 0 21 65

+ 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +

3 0 0 4 0 1 2 0 2 5 1 3 6 1 4 4 1 5 7 2 6 8 2 7 6 2 8 9 3 9 0 3 10 8 3 11 1 4 12 10 4 13 0 4 14 10 5 15 2 5 16 0 5 17 13 6 18 3 6 19 2 6 20 16 7 21 1 7 22 15 7 23 15 8 24 9 8 25 7 8 26 6 9 27 8 9 28 0 9 29 3 10 30 17 10 31 14 10 32 3 11 33 5 11 34 4 11 35 5 12 36 7 12 37 6 12 38 7 13 39 9 13 40 8 13 41 9 14 42 1 14 43 0 14 44 1 15 45 11 15 46 10 15 47 10 16 48 13 16 49 2 16 50 13 17 51 12 17 52 3 17 53 16 18 54 11 18 55 1 18 56 7 19 57 5 19 58 14 19 59 5 20 60 3 20 61 14 20 62 1 19 63 9 19 64 15 19 65 7 19 66 14 19 67 15 19 68 0 21 69 2 21 70 4 21 71 4 22 72 6 22 73 0 22 74 3 23 75 12 23 76 17 23 77

@@ -184,6 +184,49 @@ + + + + -18.11115 14.31878 5.861037 16.74848 14.38196 5.863757 -18.14698 -9.259619 5.861035 16.74848 -9.276388 5.863758 -18.1196 -5.811701 14.22825 16.74848 -5.811701 14.22825 -18.1196 2.552788 17.69293 16.74848 2.552788 17.69293 -18.1196 10.91728 14.22825 16.74848 10.91728 14.22825 -18.11115 14.31878 -5.861034 16.75472 14.31462 -5.861034 16.75312 -9.252387 -5.861037 -18.14698 -9.259619 -5.861037 16.74848 -1.39027 6.585386 16.74848 6.495846 6.585386 16.75419 6.458951 -5.861035 16.75365 -1.396718 -5.861036 + + + + + + + + + + 4.74013e-4 0.9245764 -0.3809964 0 0.3826835 -0.9238796 0 -0.3826835 -0.9238796 0 -0.9263768 -0.3765984 -1.1942e-4 -0.9999836 0.005743503 0.9999989 -0.001519501 0 4.80534e-4 0.9999999 0 -1 -4.16514e-5 -4.58537e-4 -1 0 0 0.9999999 -2.09499e-4 5.06022e-4 -1 6.80963e-5 -3.9549e-4 0 0.9238795 -0.3826835 0 0.3826833 -0.9238796 0 -0.3826833 -0.9238796 0.001704275 -0.9238782 -0.3826828 0.001812338 -0.9999985 0 0.9999989 -0.001519501 0 -2.07239e-4 0.9999979 0.002047002 -0.9999999 6.76071e-5 -5.32831e-4 -1 4.80871e-7 0 -1 0 0 -1 -1.92546e-7 0 0.9999954 -0.001519501 -0.002645432 0.9999992 5.02969e-4 0.001214861 -1 3.79335e-5 -4.15619e-4 + + + + + + + + + + 0.5565676 0.9981268 0.7294408 0.4026927 0.7294406 0.9986009 0.4585115 0.9980884 0.5565556 0.402686 0.5565676 0.9981268 0.9022533 0.9980995 1 0.4027057 1 0.9981465 0.7296274 0.9979444 0.9022532 0.4026588 0.9022533 0.9980995 0.448051 0.9993818 0.2242982 0.4040126 0.2239893 0.9994155 0.6866806 0 0.4584999 0.4026477 0.6866807 0.4026477 0 0.9999269 0.2239893 0.4040126 1.42582e-4 0.4040188 0.2302658 0.4040126 0.4584996 0.2687116 0.2302657 0.2693417 0 0.2020063 0.2302657 0.2693417 0.2302657 0.1346709 0.6866807 0.4026477 0.9169994 0.2017202 0.8495563 0.05888038 0.2302656 0 0.4584996 0.1345607 0.4584996 4.09817e-4 0.5565676 0.9981268 0.5565556 0.402686 0.7294408 0.4026927 0.4585115 0.9980884 0.4584997 0.4026477 0.5565556 0.402686 0.9022533 0.9980995 0.9022532 0.4026588 1 0.4027057 0.7296274 0.9979444 0.7294408 0.4026477 0.9022532 0.4026588 0.448051 0.9993818 0.448051 0.4040852 0.2242982 0.4040126 0.6866806 0 0.4584997 0 0.4584999 0.4026477 0 0.9999269 0.2239893 1 0.2239893 0.4040126 0.2302658 0.4040126 0.4584997 0.4028625 0.4584996 0.2687116 0.2302656 0 0.06744319 0.05916631 0.2302657 0.1346709 0 0.2020063 0.06744325 0.3448463 0.2302657 0.2693417 0.06744325 0.3448463 0.2302658 0.4040126 0.2302657 0.2693417 0.2302657 0.1346709 0.06744319 0.05916631 0 0.2020063 0.8495563 0.05888038 0.6866806 0 0.6866807 0.4026477 0.6866807 0.4026477 0.8495561 0.3445602 0.9169994 0.2017202 0.2302656 0 0.2302657 0.1346709 0.4584996 0.1345607 + + + + + + + + + + + + + + + 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +

4 0 0 3 0 1 2 0 2 6 1 3 5 1 4 4 1 5 8 2 6 7 2 7 6 2 8 0 3 9 9 3 10 8 3 11 1 4 12 10 4 13 11 4 14 2 5 15 10 5 16 0 5 17 3 6 18 13 6 19 2 6 20 1 7 21 16 7 22 15 7 23 7 8 24 15 8 25 14 8 26 0 9 27 6 9 28 4 9 29 3 10 30 17 10 31 12 10 32 4 11 33 5 11 34 3 11 35 6 12 36 7 12 37 5 12 38 8 13 39 9 13 40 7 13 41 0 14 42 1 14 43 9 14 44 1 15 45 0 15 46 10 15 47 2 16 48 13 16 49 10 16 50 3 17 51 12 17 52 13 17 53 1 18 54 11 18 55 16 18 56 3 19 57 5 19 58 14 19 59 7 8 60 9 8 61 15 8 62 9 20 63 1 20 64 15 20 65 14 21 66 5 21 67 7 21 68 4 22 69 2 22 70 0 22 71 0 23 72 8 23 73 6 23 74 3 24 75 14 24 76 17 24 77

+
+
+
@@ -204,6 +247,10 @@ 0.6 0 0 -2.171479 0 0.6 0 -3.708623 0 0 0.6 0.7429211 0 0 0 1 + + 0.3 0 0 -5.894014 0 0.3 0 1.23451 0 0 0.3 1.655645 0 0 0 1 + + diff --git a/shader/basicTexture_VS.hlsl b/shader/basicTexture_VS.hlsl index 59f371a..5ef5339 100644 --- a/shader/basicTexture_VS.hlsl +++ b/shader/basicTexture_VS.hlsl @@ -20,7 +20,7 @@ uniform mat4 uOldProjView, uInvProjView, uCur2OldModel; void main() { - PointLightPosition1 = (uView * vec4(0.0f, 1.0f, 0.0f, 1.f)).xyz; + PointLightPosition1 = (uView * vec4(2.4f, 3.7f, -5.54817f, 1.0f)).xyz; DirectionalLightDirection1 = normalize((uView * vec4(DirectionalLightDirection, 0.0f)).xyz); mat4 L = mat4(0.5f); diff --git a/shader/lightingTexture_FS.hlsl b/shader/lightingTexture_FS.hlsl index e2559d9..c50b5c2 100644 --- a/shader/lightingTexture_FS.hlsl +++ b/shader/lightingTexture_FS.hlsl @@ -32,7 +32,7 @@ void main() float specularConst = material[3]; vec4 uvColor = texture(uColorTexture, fUVs); - vec3 PointLightColor1 = vec3(2.0f, 2.0f, 2.0f); + vec3 PointLightColor1 = vec3(0.7f); vec3 cameraVec = normalize(eyePosition); vec3 worldPointLightDir1 = PointLightPosition1 - eyePosition;