diff --git a/include/Engine/Network/Client.h b/include/Engine/Network/Client.h index 2fa81549..715c5370 100644 --- a/include/Engine/Network/Client.h +++ b/include/Engine/Network/Client.h @@ -29,18 +29,7 @@ #include "Core/EAmmoPickup.h" #include "Network/ESearchForServers.h" #include "../Game/Events/EDashAbility.h" - -struct ServerInfo -{ - ServerInfo(std::string a, int b, std::string c, int d) - { - Address = a; Port = b; Name = c; PlayersConnected = d; - } - std::string Address = ""; - int Port = 0; - std::string Name = ""; - int PlayersConnected = 0; -}; +#include "Network/EDisplayServerlist.h" class Client : public Network { diff --git a/include/Engine/Network/EConnectRequest.h b/include/Engine/Network/EConnectRequest.h new file mode 100644 index 00000000..b6bf781b --- /dev/null +++ b/include/Engine/Network/EConnectRequest.h @@ -0,0 +1,17 @@ +#ifndef Events_ConnectRequest_h__ +#define Events_ConnectRequest_h__ + +#include "Core/EventBroker.h" + +namespace Events +{ + +struct ConnectRequest : public Event +{ + std::string IP = ""; + int Port = 0; +}; + +} +#endif + diff --git a/include/Engine/Network/EDisplayServerlist.h b/include/Engine/Network/EDisplayServerlist.h new file mode 100644 index 00000000..d80ad1ba --- /dev/null +++ b/include/Engine/Network/EDisplayServerlist.h @@ -0,0 +1,29 @@ +#ifndef Events_DisplayServerlist_h__ +#define Events_DisplayServerlist_h__ + +#include +#include +#include "Core/Event.h" + +struct ServerInfo +{ + ServerInfo(std::string address, int port, std::string name, int players) + { + Address = address; Port = port; Name = name; PlayersConnected = players; + } + std::string Address = ""; + int Port = 0; + std::string Name = ""; + int PlayersConnected = 0; +}; + +namespace Events +{ + +struct DisplayServerlist : public Event +{ + std::vector Serverlist; +}; + +} +#endif diff --git a/include/Engine/Rendering/BlurHUD.h b/include/Engine/Rendering/BlurHUD.h new file mode 100644 index 00000000..ca3b7270 --- /dev/null +++ b/include/Engine/Rendering/BlurHUD.h @@ -0,0 +1,70 @@ +#ifndef BlurHUD_h__ +#define BlurHUD_h__ + +#include "IRenderer.h" +#include "DrawBloomPassState.h" +//#include "LightCullingPass.h" Finalpass om den skall skickas in +#include "FrameBuffer.h" +#include "ShaderProgram.h" +//#include "Util/UnorderedMapVec2.h" +#include "Texture.h" + +class BlurHUD +{ +public: + BlurHUD(IRenderer* renderer); + ~BlurHUD() { } + void InitializeTextures(); + void InitializeFrameBuffers(); + void InitializeShaderPrograms(); + void InitializeBuffers(); + void ClearBuffer(); + + void FillGaussianBuffer(FrameBuffer* fb); + + GLuint Draw(GLuint texture, RenderScene& scene); + + void OnWindowResize(); + void FillStencil(RenderScene& scene); + GLuint CombineTextures(GLuint texture1, GLuint texture2); + + //Getters + //Return the blurred result of the texture that was sent into draw + GLuint GaussianTexture() const { + if (m_Quality == 0) { + return m_BlackTexture->m_Texture; + } else { + return m_GaussianTexture_vert; + } + } + + +private: + Texture* m_BlackTexture; + Model* m_ScreenQuad; + + const IRenderer* m_Renderer; + ConfigFile* m_Config; + //const LightCullingPass* m_LightCullingPass + int m_Iterations = 3; + int m_Quality = 0; + float m_BlurQuality = 2.f; + + GLuint m_GaussianTexture_horiz = 0; + GLuint m_GaussianTexture_vert = 0; + GLuint m_DepthStencil_horiz = 0; + GLuint m_DepthStencil_vert = 0; + GLuint m_CombinedTexture = 0; + + FrameBuffer m_GaussianFrameBuffer_horiz; + FrameBuffer m_GaussianFrameBuffer_vert; + FrameBuffer m_CombinedTextureBuffer; + + ShaderProgram* m_GaussianProgram_horiz; + ShaderProgram* m_GaussianProgram_vert; + ShaderProgram* m_FillDepthStencilProgram; + ShaderProgram* m_CombineTexturesProgram; + +}; + +#endif \ No newline at end of file diff --git a/include/Engine/Rendering/DrawFinalPass.h b/include/Engine/Rendering/DrawFinalPass.h index cfddd5c6..5d741256 100644 --- a/include/Engine/Rendering/DrawFinalPass.h +++ b/include/Engine/Rendering/DrawFinalPass.h @@ -11,6 +11,7 @@ #include "Util/UnorderedMapVec2.h" #include "Util/CommonFunctions.h" #include "Texture.h" +#include "BlurHUD.h" class DrawFinalPass { @@ -20,7 +21,7 @@ public: void InitializeTextures(); void InitializeFrameBuffers(); void InitializeShaderPrograms(); - void Draw(RenderScene& scene); + void Draw(RenderScene& scene, BlurHUD* blurHUDPass); void ClearBuffer(); void OnWindowResize(); @@ -28,6 +29,10 @@ public: GLuint BloomTexture() const { return m_BloomTexture; } //Return the texture with diffuse and lighting of the scene. GLuint SceneTexture() const { return m_SceneTexture; } + //Return the SceneTexture with the blurred HUD bits. + GLuint CombinedSceneTexture() const { return m_CombinedTexture; } + //Return the blurred scene texture. + GLuint FullBlurredTexture() const { return m_FullBlurredTexture; } //Return the framebuffer used in the scene rendering stage. FrameBuffer* FinalPassFrameBuffer() { return &m_FinalPassFrameBuffer; } @@ -57,6 +62,8 @@ private: GLuint m_DepthBuffer; GLuint m_ShieldBuffer; GLuint m_CubeMapTexture; + GLuint m_FullBlurredTexture; + GLuint m_CombinedTexture; //This can be removed for less memory usage, just set m_sceneTexture to the return from m_BlurHUDPass.CombineTextures //maqke this component based i guess? GLuint m_ShieldPixelRate = 16; diff --git a/include/Engine/Rendering/RenderQueue.h b/include/Engine/Rendering/RenderQueue.h index e3c46e85..f183b021 100644 --- a/include/Engine/Rendering/RenderQueue.h +++ b/include/Engine/Rendering/RenderQueue.h @@ -33,6 +33,7 @@ struct RenderScene Rectangle Viewport; bool ClearDepth = false; + bool ShouldBlur = false; glm::vec4 AmbientColor; void Clear() diff --git a/include/Engine/Rendering/Renderer.h b/include/Engine/Rendering/Renderer.h index a64a4aa3..9983bae9 100644 --- a/include/Engine/Rendering/Renderer.h +++ b/include/Engine/Rendering/Renderer.h @@ -18,6 +18,7 @@ #include "DrawColorCorrectionPass.h" #include "SSAOPass.h" #include "CubeMapPass.h" +#include "BlurHUD.h" #include "../Core/EventBroker.h" #include "ImGuiRenderPass.h" #include "Camera.h" @@ -75,6 +76,7 @@ private: DrawColorCorrectionPass* m_DrawColorCorrectionPass; SSAOPass* m_SSAOPass; CubeMapPass* m_CubeMapPass; + BlurHUD* m_BlurHUDPass; //----------------------Functions----------------------// void InitializeWindow(); diff --git a/include/Engine/Rendering/SpriteJob.h b/include/Engine/Rendering/SpriteJob.h index 25c2d5cb..2533d4d4 100644 --- a/include/Engine/Rendering/SpriteJob.h +++ b/include/Engine/Rendering/SpriteJob.h @@ -32,6 +32,8 @@ struct SpriteJob : RenderJob EndIndex = matProp.material->EndIndex; Matrix = matrix; Color = cSprite["Color"]; + BlurBackground = (bool)cSprite["BlurBackground"]; + Entity = cSprite.EntityID; Position = Transform::AbsolutePosition(world, cSprite.EntityID); Depth = 0; @@ -65,6 +67,7 @@ struct SpriteJob : RenderJob bool Pickable; bool IsIndicator = false; + bool BlurBackground = false; glm::vec4 FillColor = glm::vec4(0); float FillPercentage = 0.0; diff --git a/include/Engine/GUI/MainMenuSystem.h b/include/Game/Systems/MainMenuSystem.h similarity index 52% rename from include/Engine/GUI/MainMenuSystem.h rename to include/Game/Systems/MainMenuSystem.h index ba69ff0d..ddefcbf4 100644 --- a/include/Engine/GUI/MainMenuSystem.h +++ b/include/Game/Systems/MainMenuSystem.h @@ -1,15 +1,19 @@ #ifndef MainMenuSystem_h__ #define MainMenuSystem_h__ -#include "../Core/System.h" -#include "../Rendering/IRenderer.h" -#include "../Core/ResourceManager.h" -#include "../Core/Event.h" +#include "Core/System.h" +#include "Rendering/IRenderer.h" +#include "Core/ResourceManager.h" +#include "Core/Event.h" +#include "Systems/SpawnerSystem.h" -#include "EButtonClicked.h" -#include "EButtonPressed.h" -#include "EButtonReleased.h" +#include "GUI/EButtonClicked.h" +#include "GUI/EButtonPressed.h" +#include "GUI/EButtonReleased.h" +#include "Input/EInputCommand.h" +#include "Network/ESearchForServers.h" +#include "Network/EConnectRequest.h" class MainMenuSystem : public ImpureSystem @@ -27,6 +31,11 @@ private: bool OnButtonRelease(const Events::ButtonReleased& e); EventRelay m_EPressed; bool OnButtonPress(const Events::ButtonPressed& e); + EventRelay m_EInputCommand; + bool OnInputCommand(const Events::InputCommand& e); + + std::string m_CurrentCommand = ""; + EntityWrapper m_OpenSubMenu = EntityWrapper::Invalid; }; diff --git a/include/Game/Systems/ServerListSystem.h b/include/Game/Systems/ServerListSystem.h new file mode 100644 index 00000000..014c8881 --- /dev/null +++ b/include/Game/Systems/ServerListSystem.h @@ -0,0 +1,29 @@ +#ifndef ServerListSystem_h__ +#define ServerListSystem_h__ + +#include "Core/System.h" +#include "Rendering/IRenderer.h" +#include "Core/ResourceManager.h" +#include "Core/Event.h" +#include "Systems/SpawnerSystem.h" +#include "Core/EventBroker.h" + +#include "Network/ESearchForServers.h" +#include "Network/EDisplayServerlist.h" + +class ServerListSystem : public PureSystem +{ +public: + ServerListSystem(SystemParams params, IRenderer* renderer); + virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cServerList, double dt) override; + + void RefreshList(); + +private: + IRenderer* m_Renderer; + + EventRelay m_EServerListRecieved; + bool OnServerListRecieved(const Events::DisplayServerlist& e); +}; + +#endif \ No newline at end of file diff --git a/resources/Schema/Components.xsd b/resources/Schema/Components.xsd index a5bedada..bc6da932 100644 --- a/resources/Schema/Components.xsd +++ b/resources/Schema/Components.xsd @@ -66,4 +66,6 @@ + + \ No newline at end of file diff --git a/resources/Schema/Components/ServerIdentity.xml b/resources/Schema/Components/ServerIdentity.xml new file mode 100644 index 00000000..1d44e690 --- /dev/null +++ b/resources/Schema/Components/ServerIdentity.xml @@ -0,0 +1,7 @@ + + + 123.123.123.123 + 65999 + UnkownServer + 0 + \ No newline at end of file diff --git a/resources/Schema/Components/ServerIdentity.xsd b/resources/Schema/Components/ServerIdentity.xsd new file mode 100644 index 00000000..961a69c5 --- /dev/null +++ b/resources/Schema/Components/ServerIdentity.xsd @@ -0,0 +1,23 @@ + + + + + A component for tracking the data of servers in the serverlist. + + + + The IP adress of the server. + + + Port used to connect to the server. + + + Name of the server. + + + Amount of players connected to the server. + + + + + \ No newline at end of file diff --git a/resources/Schema/Components/ServerList.xml b/resources/Schema/Components/ServerList.xml new file mode 100644 index 00000000..e4dbfcad --- /dev/null +++ b/resources/Schema/Components/ServerList.xml @@ -0,0 +1,6 @@ + + + 0 + 0 + + \ No newline at end of file diff --git a/resources/Schema/Components/ServerList.xsd b/resources/Schema/Components/ServerList.xsd new file mode 100644 index 00000000..b422acda --- /dev/null +++ b/resources/Schema/Components/ServerList.xsd @@ -0,0 +1,20 @@ + + + + + The menulist where servers will be listed. + + + + The amount of server identities in this list. + + + Where the next serverIdentity should be placed. + + + How much offset should be applied per position + + + + + \ No newline at end of file diff --git a/resources/Schema/Components/Sprite.xml b/resources/Schema/Components/Sprite.xml index ce4a6e1b..e577ac96 100644 --- a/resources/Schema/Components/Sprite.xml +++ b/resources/Schema/Components/Sprite.xml @@ -5,4 +5,5 @@ true true + false diff --git a/resources/Schema/Components/Sprite.xsd b/resources/Schema/Components/Sprite.xsd index 3c3d124a..e26d71c9 100644 --- a/resources/Schema/Components/Sprite.xsd +++ b/resources/Schema/Components/Sprite.xsd @@ -24,6 +24,9 @@ Whether the sprite should be sorted with depth or not. Only use false for textures that are on HUD + + Wether the background should be blurred begind this sprite. + diff --git a/resources/Schema/Entities/MainMenu.xml b/resources/Schema/Entities/MainMenu.xml new file mode 100644 index 00000000..cefb25e2 --- /dev/null +++ b/resources/Schema/Entities/MainMenu.xml @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Credits + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + Play + 1 + + + + + + + + + + + Play + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Option + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Quit + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + Schema/Entities/ServerList.xml + + + + + + + + + + diff --git a/resources/Schema/Entities/QualityAssurance.xml b/resources/Schema/Entities/QualityAssurance.xml index 04cc288a..8b88404a 100644 --- a/resources/Schema/Entities/QualityAssurance.xml +++ b/resources/Schema/Entities/QualityAssurance.xml @@ -3,7 +3,7 @@ - 4.7473226580121377 + 3.6154132075906489 @@ -11,6 +11,104 @@ + + + + + + + + + + + + + + + Models/Characters/Assault/AssaultAnimated.mesh + + + + + + + + + + + + + + Models/Characters/Assault/AssaultAnimated.mesh + + + + + + + + + Animation test + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + + + + Models/Characters/Assault/AssaultAnimated.mesh + + + + + + + + + + + + + @@ -43,7 +141,7 @@ - + @@ -96,115 +194,11 @@ - + - - - - - - - - - - - - - - - - - Models/Characters/Assault/AssaultAnimated.mesh - - - - - - - - - - - - - - - - Models/Characters/Assault/AssaultAnimated.mesh - - - - - - - - - Animation test - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - Models/Core/UnitCylinder.mesh - - - - - - - - - - - - - - - - - - - - 0.5 - - - - - - - - - - - - - - - - Models/Characters/Assault/AssaultAnimated.mesh - - - - - - - - - - - - - @@ -228,7 +222,7 @@ - + @@ -292,7 +286,7 @@ - + @@ -324,7 +318,7 @@ - + @@ -395,15 +389,15 @@ - - - Schema/Entities/Player.xml - + + + Schema/Entities/Player.xml + @@ -465,15 +459,15 @@ - - - Schema/Entities/Player.xml - + + + Schema/Entities/Player.xml + @@ -619,8 +613,8 @@ - + @@ -674,7 +668,7 @@ - + @@ -721,7 +715,7 @@ - + @@ -781,7 +775,7 @@ - + @@ -828,7 +822,7 @@ - + @@ -874,7 +868,7 @@ - + @@ -921,7 +915,7 @@ - + @@ -968,7 +962,7 @@ - + @@ -1023,22 +1017,22 @@ + 15 - 15 + + + + + Models/Core/UnitCube.mesh true - - - - - @@ -1054,8 +1048,8 @@ - + @@ -1078,13 +1072,13 @@ 1 + Models/Core/UnitCube.mesh true - @@ -1100,8 +1094,8 @@ - + @@ -1122,13 +1116,13 @@ 2 + Models/Core/UnitCube.mesh true - @@ -1144,8 +1138,8 @@ - + @@ -1168,13 +1162,13 @@ 3 + Models/Core/UnitCube.mesh true - @@ -1190,8 +1184,8 @@ - + @@ -1212,23 +1206,23 @@ + -15 - -15 4 + + + + + Models/Core/UnitCube.mesh true - - - - - @@ -1244,8 +1238,8 @@ - + @@ -1285,8 +1279,8 @@ - + @@ -1382,7 +1376,7 @@ - + @@ -1391,7 +1385,7 @@ true - 2.5396116058983438 + 1.5712751414989441 3.7999999523162842 true @@ -1438,7 +1432,7 @@ - + @@ -1447,7 +1441,7 @@ - 1.5396208215609732 + 0.85439856235552725 Models/Characters/Assault/AssaultTPose.mesh @@ -1490,22 +1484,20 @@ - + - - - + true - 1.5396208215609732 + 0.85439856235552725 true @@ -1550,7 +1542,7 @@ - + @@ -1560,7 +1552,7 @@ true - 4.4522528839264339 + 7.5223549108000043 10 3 @@ -1608,7 +1600,7 @@ - + @@ -1618,7 +1610,7 @@ true - 3.2362842141074992 + 0.39702717854592606 true 5 true @@ -1655,8 +1647,8 @@ - + @@ -1701,6 +1693,11 @@ + + + + + @@ -1711,11 +1708,6 @@ 5 - - - - - @@ -1738,8 +1730,8 @@ - + @@ -1777,8 +1769,8 @@ - + @@ -1790,8 +1782,8 @@ - + @@ -1801,7 +1793,7 @@ true - 2.5396116058983438 + 1.5712751414989441 3.7999999523162842 true @@ -1845,9 +1837,7 @@ - - - + @@ -1915,8 +1905,8 @@ - + @@ -1991,20 +1981,20 @@ - - 2 - + + 2 + Textures/Core/UnitHexagon_Rotated.png - + @@ -2025,20 +2015,20 @@ - - 3 - + + 3 + Textures/Core/UnitHexagon_Rotated.png - + @@ -2059,21 +2049,21 @@ - - 4 - 1 + + 4 + Textures/Core/UnitHexagon_Rotated.png - + @@ -2094,20 +2084,20 @@ - - 1 - + + 1 + Textures/Core/UnitHexagon_Rotated.png - + @@ -2128,19 +2118,19 @@ - 1 + Textures/Core/UnitHexagon_Rotated.png - + @@ -2166,14 +2156,24 @@ - + + + + + + + + + + + - + @@ -2374,7 +2374,9 @@ Textures/Core/ErrorTexture.png + true + @@ -2387,6 +2389,7 @@ Textures/Core/White.png + false @@ -2400,6 +2403,7 @@ 1920x1080 Fonts/DroidSans.ttf,64 + false @@ -2416,6 +2420,7 @@ Textures/Core/White.png + false @@ -2429,6 +2434,7 @@ 1280x720 Fonts/DroidSans.ttf,64 + false @@ -2540,20 +2546,20 @@ + + + + + 2 Models/Weapons/Blue/AssaultWeaponBlue.mesh - - - - - + - diff --git a/resources/Schema/Entities/ServerIdentity.xml b/resources/Schema/Entities/ServerIdentity.xml new file mode 100644 index 00000000..3c47e045 --- /dev/null +++ b/resources/Schema/Entities/ServerIdentity.xml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + 123.123.123.123 + Fonts/DroidSans.ttf,64 + + + + + + + ServerIdentity + ServerIdentity + IP + + + + + + + + + + + + 65999 + Fonts/DroidSans.ttf,64 + + + + + + + ServerIdentity + ServerIdentity + Port + + + + + + + + + + + + UnkownServer + Fonts/DroidSans.ttf,64 + + + + + + + ServerIdentity + ServerIdentity + ServerName + + + + + + + + + + + 0 + Fonts/DroidSans.ttf,64 + + + + + + + ServerIdentity + ServerIdentity + PlayersConnected + + + + + + + + + + + + Textures/Core/White.png + true + + false + + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/ServerList.xml b/resources/Schema/Entities/ServerList.xml new file mode 100644 index 00000000..68c10bf7 --- /dev/null +++ b/resources/Schema/Entities/ServerList.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + Schema/Entities/ServerIdentity.xml + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + RefreshServerList + 1 + + + + + + + + + + + Textures/Icons/rotate.png + + + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/aaaatestremoveme.xml b/resources/Schema/Entities/aaaatestremoveme.xml index 8da40b58..d44e4883 100644 --- a/resources/Schema/Entities/aaaatestremoveme.xml +++ b/resources/Schema/Entities/aaaatestremoveme.xml @@ -2,37 +2,5794 @@ + + 8.2999489298303502 + 15 + - + - - Models/Core/Unithexagon.mesh - - - + + + + + + Models/Props/Ground.mesh + + + + + + + + + Models/Props/Highground2.mesh + + + + + + + + + + + + Models/Props/Highground3.mesh + + + + + + + + + + Models/Props/Highground4.mesh + + + + + + + + + + Models/Props/Highground1.mesh + + + + + + + + + + Models/Props/Highground2.mesh + + + + + + + + + + Models/Props/Highground1.mesh + + + + + + + + + + + + Models/Props/Highground5.mesh + + + + + + + + + + + Models/Props/Highground6.mesh + + + + + + + + + + Models/Props/Walls/SciFiWallTop.mesh + + + + + + + + + Models/Props/Walls/SciFiWallBig.mesh + + + + + + + + + + Models/Props/Walls/SciFiWallMedium.mesh + + + + + + + + + + Models/Props/Walls/SciFiWallSmall1.mesh + + + + + + + + + + Models/Props/Walls/SciFiWallSmall2.mesh + + + + + + + + + + Models/Props/Walls/SciFiWallBig.mesh + + + + + + + + + + + + Models/Props/Walls/SciFiWallMedium.mesh + + + + + + + + + + + + Models/Props/Walls/SciFiWallSmall3.mesh + + + + + + + + + + Models/Props/Walls/SciFiWallSmall4.mesh + + + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar3Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar3Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall4.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall4.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall4.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall2.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + Models/Props/Walls/SmallWall4.mesh + + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Bridges/WoodenBridge.mesh + + + + + + + + + + + + + + Models/Props/Bridges/WoodenBridge.mesh + + + + + + + + + + + + + + Models/Props/Bridges/WoodenBridge.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Blue.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Blue.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Blue.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridge1Red.mesh + + + + + + + + + + + + + Models/Props/Bridges/WoodenBridge.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall2.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + Models/Props/Walls/MediumWall1.mesh + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiBridgePillar1.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + + Models/Props/Flora/TreeLog.mesh + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/AliveBush.mesh + true + + + + + + + + + + + + + + Models/Props/Flora/SpecialRoot.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + - + - + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + 0.10000000149011612 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + + + + Schema/Entities/Player.xml + - + - + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + - + - - 2.2000000476837158 - - + + + + + 10 + + + + + + + + + + 10 + + + + + + + + + + + + + 1 + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 2 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointRed.mesh + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 3 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 1.5498908015879351 + 1 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointBlue.mesh + + + + + + + + + + + + + 4 + + + + + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + + + + + + Schema/Entities/PlayerRed.xml + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + + 0.049999997019767761 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + 4 + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + 3 + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + 2 + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + + + + + + + + + 0.10332605343919568 + + + + 1 + + + Textures/Core/UnitHexagon_Rotated.png + + + + + + + + + + + + + + + + + + 7 + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Play + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Option + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Credits + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/White.png + true + + + + + + + + + + + + + Quit + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/UnitRaptor.png + + + + PickClass + 1 + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + + + PickClass + 2 + + + + + + + + + + + + + Textures/Test/aM4ME4GR.png + + + + PickClass + 3 + + + + + + + + + + + + + + + diff --git a/resources/Schema/Types/Entity.xsd b/resources/Schema/Types/Entity.xsd index 3d73f970..c0ac15aa 100644 --- a/resources/Schema/Types/Entity.xsd +++ b/resources/Schema/Types/Entity.xsd @@ -69,6 +69,8 @@ + + diff --git a/resources/Shaders/CombineTexture.frag.glsl b/resources/Shaders/CombineTexture.frag.glsl new file mode 100644 index 00000000..fd4acaac --- /dev/null +++ b/resources/Shaders/CombineTexture.frag.glsl @@ -0,0 +1,31 @@ +#version 430 + +layout (binding = 0) uniform sampler2D Texture0; +layout (binding = 1)uniform sampler2D Texture1; + + +in VertexData{ + vec2 TextureCoordinate; +}Input; + +out vec4 sceneColor; +out vec4 bloomColor; + +void main() +{ + vec4 texel0 = texture(Texture0, Input.TextureCoordinate); + vec4 texel1 = texture(Texture1, Input.TextureCoordinate); + float texel1_total = (texel1.r + texel1.g + texel1.b) * texel1.a; + texel1_total = ceil(clamp(texel1_total, 0, 1)); + + vec4 result0 = texel0 * (1.0 - texel1_total); + vec4 result1 = texel1 * texel1_total; + + //vec4 final = texel1 * texel1_total + texel0 * (1.0 - texel1_total); + //float res = 1.0 - texel1_total; + //vec4 final = vec4(texel1_total, texel1_total, texel1_total, 1.0); + sceneColor = result1; + bloomColor = vec4(0.0, 0.0, 0.0, 0.0); +} + + diff --git a/resources/Shaders/CombineTexture.vert.glsl b/resources/Shaders/CombineTexture.vert.glsl new file mode 100644 index 00000000..346bc141 --- /dev/null +++ b/resources/Shaders/CombineTexture.vert.glsl @@ -0,0 +1,13 @@ +#version 430 + +layout (location = 0) in vec3 Position; + +out VertexData{ + vec2 TextureCoordinate; +}Output; + +void main() +{ + gl_Position = vec4(Position, 1.0); + Output.TextureCoordinate = (vec2(Position) + 1) / 2; +} \ No newline at end of file diff --git a/resources/Shaders/Gaussian_horiz.frag.glsl b/resources/Shaders/Gaussian_horiz.frag.glsl index 6a9572c2..8a306ec2 100644 --- a/resources/Shaders/Gaussian_horiz.frag.glsl +++ b/resources/Shaders/Gaussian_horiz.frag.glsl @@ -14,11 +14,15 @@ uniform float weight[5] = float[](0.227027, 0.1945946, 0.1216216, 0.054054, 0.01 void main() { vec2 tex_offset = 1.0 / textureSize2D(Texture, 0); - vec3 result = texture(Texture, Input.TextureCoordinate).rgb * weight[0]; - + vec3 center = texture(Texture, Input.TextureCoordinate).rgb; + vec3 result = center * weight[0]; for(int i = 1; i < 5; ++i) { - result += texture(Texture, Input.TextureCoordinate + vec2(tex_offset.x * i, 0.0)).rgb * weight[i]; - result += texture(Texture, Input.TextureCoordinate - vec2(tex_offset.x * i, 0.0)).rgb * weight[i]; + vec4 eastFragments = texture(Texture, Input.TextureCoordinate + vec2(tex_offset.x * i, 0.0)); + vec4 westFragments = texture(Texture, Input.TextureCoordinate - vec2(tex_offset.x * i, 0.0)); + result += eastFragments.rgb * weight[i] * eastFragments.a; + result += westFragments.rgb * weight[i] * westFragments.a; + result += center * weight[i] * (1.0 - westFragments.a); + result += center * weight[i] * (1.0 - eastFragments.a); } fragmentColor = vec4(result, 1.0); } \ No newline at end of file diff --git a/resources/Shaders/Gaussian_vert.frag.glsl b/resources/Shaders/Gaussian_vert.frag.glsl index 8b0e861a..921ba55a 100644 --- a/resources/Shaders/Gaussian_vert.frag.glsl +++ b/resources/Shaders/Gaussian_vert.frag.glsl @@ -14,11 +14,15 @@ uniform float weight[5] = float[](0.227027, 0.1945946, 0.1216216, 0.054054, 0.01 void main() { vec2 tex_offset = 1.0 / textureSize2D(Texture, 0); - vec3 result = texture(Texture, Input.TextureCoordinate).rgb * weight[0]; - + vec3 center = texture(Texture, Input.TextureCoordinate).rgb; + vec3 result = center * weight[0]; for(int i = 1; i < 5; ++i) { - result += texture(Texture, Input.TextureCoordinate + vec2(0.0, tex_offset.y * i)).rgb * weight[i]; - result += texture(Texture, Input.TextureCoordinate - vec2(0.0, tex_offset.y * i)).rgb * weight[i]; + vec4 northFragments = texture(Texture, Input.TextureCoordinate + vec2(0.0, tex_offset.y * i)); + vec4 southFragments = texture(Texture, Input.TextureCoordinate - vec2(0.0, tex_offset.y * i)); + result += northFragments.rgb * weight[i] * northFragments.a; + result += southFragments.rgb * weight[i] * southFragments.a; + result += center * weight[i] * (1.0 - northFragments.a); + result += center * weight[i] * (1.0 - southFragments.a); } fragmentColor = vec4(result, 1.0); } \ No newline at end of file diff --git a/resources/Shaders/Sprite.frag.glsl b/resources/Shaders/Sprite.frag.glsl index 754be6ac..266398da 100644 --- a/resources/Shaders/Sprite.frag.glsl +++ b/resources/Shaders/Sprite.frag.glsl @@ -35,7 +35,8 @@ void main() sceneColor = vec4(color_result.xyz, clamp(color_result.a, 0, 1)); //bloomColor = vec4(clamp((glowTexel.xyz*3) - 1.0, 0, 100), 1.0); - bloomColor = vec4(1.0, 1.0, 1.0, 0.0); + bloomColor = vec4(max(color_result.xyz - 1.0, 0.0), clamp(color_result.a, 0, 1)); + //bloomColor = vec4(1.0, 1.0, 1.0, 0.0); } diff --git a/src/Engine/GUI/MainMenuSystem.cpp b/src/Engine/GUI/MainMenuSystem.cpp deleted file mode 100644 index f8bf032b..00000000 --- a/src/Engine/GUI/MainMenuSystem.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "GUI/MainMenuSystem.h" - -MainMenuSystem::MainMenuSystem(SystemParams params, IRenderer* renderer) - : System(params) - , ImpureSystem() - , m_Renderer(renderer) -{ - EVENT_SUBSCRIBE_MEMBER(m_EPressed, &MainMenuSystem::OnButtonPress); - EVENT_SUBSCRIBE_MEMBER(m_EReleased, &MainMenuSystem::OnButtonRelease); - EVENT_SUBSCRIBE_MEMBER(m_EClicked, &MainMenuSystem::OnButtonClick); -} - -void MainMenuSystem::Update(double dt) -{ - -} - -bool MainMenuSystem::OnButtonClick(const Events::ButtonClicked& e) -{ - if(e.EntityName == "Play") { - //Run play code - } else if(e.EntityName == "Connect") { - //Run connect code - } else if(e.EntityName == "Host") { - //Run host code - } else if(e.EntityName == "Quit") { - printf("No, you stay"); - } else if (e.EntityName == "Res1080") { - glfwSetWindowSize(m_Renderer->Window(), 1920, 1080); - printf("\n1080"); - } else if (e.EntityName == "Res720") { - glfwSetWindowSize(m_Renderer->Window(), 1280, 720); - glViewport(0, 0, 1280, 720); - printf("\n720"); - } else if (e.EntityName == "Res480") { - glfwSetWindowSize(m_Renderer->Window(), 854, 480); - glViewport(0, 0, 854, 480); - printf("\n480"); - } else if (e.EntityName == "FullScreen") { - printf("No fullscreen for now"); - } - - return true; -} - -bool MainMenuSystem::OnButtonRelease(const Events::ButtonReleased& e) -{ - - return true; -} - -bool MainMenuSystem::OnButtonPress(const Events::ButtonPressed& e) -{ - - return true; -} - diff --git a/src/Engine/Network/Client.cpp b/src/Engine/Network/Client.cpp index e29c4755..f1155c3b 100644 --- a/src/Engine/Network/Client.cpp +++ b/src/Engine/Network/Client.cpp @@ -82,7 +82,10 @@ void Client::Update() if (m_SearchingForServers) { if (m_SearchingTime < (1000* (std::clock() - m_StartSearchTime) / (double)CLOCKS_PER_SEC)) { m_SearchingForServers = false; - displayServerlist(); + //displayServerlist(); + Events::DisplayServerlist e; + e.Serverlist = m_Serverlist; + m_EventBroker->Publish(e); } } @@ -463,12 +466,6 @@ void Client::disconnect() bool Client::OnInputCommand(const Events::InputCommand & e) { - // TEMP - if (e.Command == "SearchForServers" && e.Value > 0) { - Events::SearchForServers e; - m_EventBroker->Publish(e); - } - if (e.PlayerID != -1) { return false; } @@ -553,7 +550,6 @@ bool Client::OnSearchForServers(const Events::SearchForServers& e) m_SearchingForServers = true; m_StartSearchTime = std::clock(); m_Serverlist.clear(); - LOG_INFO("Searching for LAN servers...\n"); Packet packet(MessageType::ServerlistRequest); m_ServerlistRequest.Broadcast(packet, 13); // TODO: Config return true; diff --git a/src/Engine/Rendering/BlurHUD.cpp b/src/Engine/Rendering/BlurHUD.cpp new file mode 100644 index 00000000..422b9ec4 --- /dev/null +++ b/src/Engine/Rendering/BlurHUD.cpp @@ -0,0 +1,282 @@ +#include "Rendering/BlurHUD.h" + +BlurHUD::BlurHUD(IRenderer* renderer) + : m_Renderer(renderer) +{ + InitializeShaderPrograms(); + InitializeBuffers(); + InitializeTextures(); +} + +void BlurHUD::InitializeTextures() +{ + m_BlackTexture = CommonFunctions::LoadTexture("Textures/Core/Black.png", false); + m_ScreenQuad = ResourceManager::Load("Models/Core/ScreenQuad.mesh"); +} + +void BlurHUD::InitializeShaderPrograms() +{ + m_GaussianProgram_horiz = ResourceManager::Load("##GaussianProgramHoriz"); + if (m_GaussianProgram_horiz->GetHandle() == 0) { + m_GaussianProgram_horiz->AddShader(std::shared_ptr(new VertexShader("Shaders/Gaussian_horiz.vert.glsl"))); + m_GaussianProgram_horiz->AddShader(std::shared_ptr(new FragmentShader("Shaders/Gaussian_horiz.frag.glsl"))); + m_GaussianProgram_horiz->Compile(); + m_GaussianProgram_horiz->BindFragDataLocation(0, "fragmentColor"); + m_GaussianProgram_horiz->Link(); + } + + m_GaussianProgram_vert = ResourceManager::Load("##GaussianProgramVert"); + if (m_GaussianProgram_vert->GetHandle() == 0) { + m_GaussianProgram_vert->AddShader(std::shared_ptr(new VertexShader("Shaders/Gaussian_vert.vert.glsl"))); + m_GaussianProgram_vert->AddShader(std::shared_ptr(new FragmentShader("Shaders/Gaussian_vert.frag.glsl"))); + m_GaussianProgram_vert->Compile(); + m_GaussianProgram_vert->BindFragDataLocation(0, "fragmentColor"); + m_GaussianProgram_vert->Link(); + } + m_FillDepthStencilProgram = ResourceManager::Load("#FillDepthStencilProgram"); + if (m_FillDepthStencilProgram->GetHandle() == 0) { + m_FillDepthStencilProgram->AddShader(std::shared_ptr(new VertexShader("Shaders/FillDepthBuffer.vert.glsl"))); + m_FillDepthStencilProgram->Compile(); + m_FillDepthStencilProgram->Link(); + } + m_CombineTexturesProgram = ResourceManager::Load("#CombineTexturesProgram"); + if (m_CombineTexturesProgram->GetHandle() == 0) { + m_CombineTexturesProgram->AddShader(std::shared_ptr(new VertexShader("Shaders/CombineTexture.vert.glsl"))); + m_CombineTexturesProgram->AddShader(std::shared_ptr(new FragmentShader("Shaders/CombineTexture.frag.glsl"))); + m_CombineTexturesProgram->Compile(); + m_CombineTexturesProgram->BindFragDataLocation(0, "sceneColor"); + m_CombineTexturesProgram->BindFragDataLocation(1, "bloomColor"); + m_CombineTexturesProgram->Link(); + } + GLERROR("Creating DepthFill program"); +} + +void BlurHUD::InitializeBuffers() +{ + glm::vec2 res = glm::vec2(m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); + glm::vec2 res2 = glm::vec2(m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); + + + CommonFunctions::GenerateTexture(&m_DepthStencil_horiz, GL_CLAMP_TO_BORDER, GL_NEAREST, + res2, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8); + CommonFunctions::GenerateTexture(&m_GaussianTexture_horiz, GL_CLAMP_TO_EDGE, GL_NEAREST, + res2, GL_RGBA16F, GL_RGBA, GL_FLOAT); + + if (m_GaussianFrameBuffer_horiz.GetHandle() == 0) { + m_GaussianFrameBuffer_horiz.AddResource(std::shared_ptr(new Texture2D(&m_DepthStencil_horiz, GL_DEPTH_STENCIL_ATTACHMENT))); + m_GaussianFrameBuffer_horiz.AddResource(std::shared_ptr(new Texture2D(&m_GaussianTexture_horiz, GL_COLOR_ATTACHMENT0))); + } + m_GaussianFrameBuffer_horiz.Generate(); + + CommonFunctions::GenerateTexture(&m_DepthStencil_vert, GL_CLAMP_TO_BORDER, GL_NEAREST, + res2, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8); + CommonFunctions::GenerateTexture(&m_GaussianTexture_vert, GL_CLAMP_TO_EDGE, GL_NEAREST, + res2, GL_RGBA16F, GL_RGBA, GL_FLOAT); + + if (m_GaussianFrameBuffer_vert.GetHandle() == 0) { + m_GaussianFrameBuffer_vert.AddResource(std::shared_ptr(new Texture2D(&m_DepthStencil_vert, GL_DEPTH_STENCIL_ATTACHMENT))); + m_GaussianFrameBuffer_vert.AddResource(std::shared_ptr(new Texture2D(&m_GaussianTexture_vert, GL_COLOR_ATTACHMENT0))); + } + m_GaussianFrameBuffer_vert.Generate(); + + CommonFunctions::GenerateTexture(&m_CombinedTexture, GL_CLAMP_TO_BORDER, GL_NEAREST, + res, GL_RGB16F, GL_RGB, GL_FLOAT); + + if (m_CombinedTextureBuffer.GetHandle() == 0) { + m_CombinedTextureBuffer.AddResource(std::shared_ptr(new Texture2D(&m_CombinedTexture, GL_COLOR_ATTACHMENT0))); + } + m_CombinedTextureBuffer.Generate(); +} + + +void BlurHUD::ClearBuffer() +{ + GLERROR("PRE"); + m_GaussianFrameBuffer_horiz.Bind(); + glClearColor(0.f, 0.f, 0.f, 0.f); + glClearStencil(0x00); + glStencilMask(~0); + glDisable(GL_SCISSOR_TEST); + glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + m_GaussianFrameBuffer_horiz.Unbind(); + m_GaussianFrameBuffer_vert.Bind(); + glClearColor(0.f, 0.f, 0.f, 0.f); + glClearStencil(0x00); + glStencilMask(~0); + glDisable(GL_SCISSOR_TEST); + glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + m_GaussianFrameBuffer_vert.Unbind(); + + m_CombinedTextureBuffer.Bind(); + glClearColor(0.f, 0.f, 0.f, 0.f); + glClear(GL_COLOR_BUFFER_BIT); + m_CombinedTextureBuffer.Unbind(); + GLERROR("END"); +} + +//Returns the finished blurred texture +GLuint BlurHUD::Draw(GLuint texture, RenderScene& scene) +{ + GLERROR("DrawBloomPass::Draw: Pre"); + + FillStencil(scene); + + RenderState state; + state.Disable(GL_BLEND); + state.Disable(GL_DEPTH_TEST); + state.Disable(GL_CULL_FACE); + + state.Enable(GL_STENCIL_TEST); + state.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); + state.StencilFunc(GL_EQUAL, 1, 0xFF); + state.StencilMask(0x00); + state.DepthMask(GL_FALSE); + state.Enable(GL_SCISSOR_TEST); + + GLuint shaderHandle_horiz = m_GaussianProgram_horiz->GetHandle(); + GLuint shaderHandle_vert = m_GaussianProgram_vert->GetHandle(); + + //Horizontal pass, first use the given texture then save it to the horizontal framebuffer. + m_GaussianFrameBuffer_horiz.Bind(); + + glViewport(0, 0, m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); + glScissor(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); + + m_GaussianProgram_horiz->Bind(); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, texture); + glBindVertexArray(m_ScreenQuad->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ScreenQuad->ElementBuffer); + glDrawElementsBaseVertex(GL_TRIANGLES, m_ScreenQuad->MaterialGroups()[0].material->EndIndex - m_ScreenQuad->MaterialGroups()[0].material->StartIndex +1 + , GL_UNSIGNED_INT, 0, m_ScreenQuad->MaterialGroups()[0].material->StartIndex); + //Iterate some times to make it more gaussian. + for (int i = 1; i < m_Iterations; i++) { + //Vertical pass + m_GaussianFrameBuffer_vert.Bind(); + m_GaussianProgram_vert->Bind(); + + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, m_GaussianTexture_horiz); + + glBindVertexArray(m_ScreenQuad->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ScreenQuad->ElementBuffer); + glDrawElementsBaseVertex(GL_TRIANGLES, m_ScreenQuad->MaterialGroups()[0].material->EndIndex - m_ScreenQuad->MaterialGroups()[0].material->StartIndex +1 + , GL_UNSIGNED_INT, 0, m_ScreenQuad->MaterialGroups()[0].material->StartIndex); + //horizontal pass + m_GaussianFrameBuffer_vert.Unbind(); + m_GaussianFrameBuffer_horiz.Bind(); + m_GaussianProgram_horiz->Bind(); + + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, m_GaussianTexture_vert); + + glBindVertexArray(m_ScreenQuad->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ScreenQuad->ElementBuffer); + glDrawElementsBaseVertex(GL_TRIANGLES, m_ScreenQuad->MaterialGroups()[0].material->EndIndex - m_ScreenQuad->MaterialGroups()[0].material->StartIndex +1 + , GL_UNSIGNED_INT, 0, m_ScreenQuad->MaterialGroups()[0].material->StartIndex); + m_GaussianFrameBuffer_horiz.Unbind(); + } + + //final vertical gaussian after the iterations are done + + m_GaussianFrameBuffer_vert.Bind(); + m_GaussianProgram_vert->Bind(); + + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, m_GaussianTexture_horiz); + glBindVertexArray(m_ScreenQuad->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ScreenQuad->ElementBuffer); + glDrawElementsBaseVertex(GL_TRIANGLES, m_ScreenQuad->MaterialGroups()[0].material->EndIndex - m_ScreenQuad->MaterialGroups()[0].material->StartIndex +1 + , GL_UNSIGNED_INT, 0, m_ScreenQuad->MaterialGroups()[0].material->StartIndex); + + GLERROR("DrawBloomPass::Draw: END"); + glViewport(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); + glScissor(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); + + + return m_GaussianTexture_vert; +} + + +void BlurHUD::OnWindowResize() +{ + CommonFunctions::GenerateTexture(&m_GaussianTexture_vert, GL_CLAMP_TO_EDGE, GL_LINEAR, glm::vec2(m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality), GL_RGB16F, GL_RGB, GL_FLOAT); + m_GaussianFrameBuffer_vert.Generate(); + CommonFunctions::GenerateTexture(&m_GaussianTexture_horiz, GL_CLAMP_TO_EDGE, GL_LINEAR, glm::vec2(m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality), GL_RGB16F, GL_RGB, GL_FLOAT); + m_GaussianFrameBuffer_horiz.Generate(); +} + +void BlurHUD::FillStencil(RenderScene& scene) +{ + RenderState state; + + state.BindFramebuffer(m_GaussianFrameBuffer_horiz.GetHandle()); + state.Disable(GL_DEPTH_TEST); + state.Enable(GL_CULL_FACE); + state.Enable(GL_STENCIL_TEST); + state.StencilFunc(GL_ALWAYS, 1, 0xFF); + state.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); + state.StencilMask(0xFF); + glViewport(0, 0, m_Renderer->GetViewportSize().Width/m_BlurQuality, m_Renderer->GetViewportSize().Height/m_BlurQuality); + + m_FillDepthStencilProgram->Bind(); + + GLuint shaderHandle = m_FillDepthStencilProgram->GetHandle(); + + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "V"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ViewMatrix())); + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "P"), 1, GL_FALSE, glm::value_ptr(scene.Camera->ProjectionMatrix())); + + for (auto& job : scene.Jobs.SpriteJob) { + auto spriteJob = std::dynamic_pointer_cast(job); + if (!spriteJob) { + continue; + } + if (!spriteJob->BlurBackground) { + continue; + } + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(spriteJob->Matrix)); + + glBindVertexArray(spriteJob->Model->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, spriteJob->Model->ElementBuffer); + glDrawElements(GL_TRIANGLES, spriteJob->EndIndex - spriteJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(spriteJob->StartIndex*sizeof(unsigned int))); + } + + state.BindFramebuffer(m_GaussianFrameBuffer_vert.GetHandle()); + for (auto& job : scene.Jobs.SpriteJob) { + auto spriteJob = std::dynamic_pointer_cast(job); + if (!spriteJob) { + continue; + } + if(!spriteJob->BlurBackground) { + continue; + } + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(spriteJob->Matrix)); + + glBindVertexArray(spriteJob->Model->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, spriteJob->Model->ElementBuffer); + glDrawElements(GL_TRIANGLES, spriteJob->EndIndex - spriteJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(spriteJob->StartIndex*sizeof(unsigned int))); + } + glViewport(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); +} + +//Texture 1 will be used if texture 2 is black at that texel, else texture 2 is used. +GLuint BlurHUD::CombineTextures(GLuint texture1, GLuint texture2) +{ + //RenderState state; + //state.BindFramebuffer(m_CombinedTextureBuffer.GetHandle()); + //state.Disable(GL_DEPTH_TEST); + //state.Disable(GL_STENCIL_TEST); + + m_CombineTexturesProgram->Bind(); + + glActiveTexture(GL_TEXTURE0); + glActiveTexture(GL_TEXTURE1); + glBindTexture(GL_TEXTURE_2D, texture1); + glBindTexture(GL_TEXTURE_2D, texture2); + glBindVertexArray(m_ScreenQuad->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_ScreenQuad->ElementBuffer); + glDrawElementsBaseVertex(GL_TRIANGLES, m_ScreenQuad->MaterialGroups()[0].material->EndIndex - m_ScreenQuad->MaterialGroups()[0].material->StartIndex +1 + , GL_UNSIGNED_INT, 0, m_ScreenQuad->MaterialGroups()[0].material->StartIndex); + + return m_CombinedTexture; +} diff --git a/src/Engine/Rendering/DrawFinalPass.cpp b/src/Engine/Rendering/DrawFinalPass.cpp index a610fab1..edde3ef5 100644 --- a/src/Engine/Rendering/DrawFinalPass.cpp +++ b/src/Engine/Rendering/DrawFinalPass.cpp @@ -233,7 +233,7 @@ void DrawFinalPass::InitializeShaderPrograms() } -void DrawFinalPass::Draw(RenderScene& scene) +void DrawFinalPass::Draw(RenderScene& scene, BlurHUD* blurHUDPass) { GLERROR("Pre"); DrawFinalPassState* stateDethp = new DrawFinalPassState(m_ShieldDepthFrameBuffer.GetHandle()); @@ -280,16 +280,32 @@ void DrawFinalPass::Draw(RenderScene& scene) DrawModelRenderQueuesWithShieldCheck(scene.Jobs.TransparentObjects, scene); //might need changing GLERROR("Shielded Transparent objects"); + //Generate blur texture. + delete state; + if (scene.ShouldBlur) { + //This needs to be drawn only when the full scene is being renderd, and then let be, otherwise sprite and other shit will show on it. + m_FullBlurredTexture = blurHUDPass->Draw(m_SceneTexture, scene); + } + + DrawFinalPassState* stateSprite = new DrawFinalPassState(m_FinalPassFrameBuffer.GetHandle()); + if(scene.ShouldBlur) { + //Combine nonblur and blur texture + stateSprite->Disable(GL_DEPTH_TEST); + stateSprite->Disable(GL_STENCIL_TEST); + m_CombinedTexture = blurHUDPass->CombineTextures(m_SceneTexture, m_FullBlurredTexture); + + } //Draw Transparen objects //state->BlendFunc(GL_ONE, GL_ONE); //state->StencilFunc(GL_EQUAL, 1, 0xFF); //DrawModelRenderQueues(scene.Jobs.TransparentObjects, scene); GLERROR("TransparentObjects"); //state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + stateSprite->Enable(GL_DEPTH_TEST); DrawSprites(scene.Jobs.SpriteJob, scene); GLERROR("SpriteJobs"); - delete state; + delete stateSprite; GLERROR("END"); } diff --git a/src/Engine/Rendering/RenderSystem.cpp b/src/Engine/Rendering/RenderSystem.cpp index a1f00c88..114f432b 100644 --- a/src/Engine/Rendering/RenderSystem.cpp +++ b/src/Engine/Rendering/RenderSystem.cpp @@ -435,6 +435,7 @@ void RenderSystem::Update(double dt) } RenderScene scene; + scene.ShouldBlur = true; scene.Camera = m_Camera; scene.Viewport = Rectangle(1280, 720); diff --git a/src/Engine/Rendering/Renderer.cpp b/src/Engine/Rendering/Renderer.cpp index 7e11f3b2..f58e6208 100644 --- a/src/Engine/Rendering/Renderer.cpp +++ b/src/Engine/Rendering/Renderer.cpp @@ -110,7 +110,7 @@ void Renderer::Draw(RenderFrame& frame) { GLERROR("PRE"); glBindFramebuffer(GL_FRAMEBUFFER, 0); - ImGui::Combo("Draw textures", &m_DebugTextureToDraw, "Final\0Scene\0Bloom\0Gaussian\0Picking\0Ambient Occlusion"); + ImGui::Combo("Draw textures", &m_DebugTextureToDraw, "Final\0Scene\0Bloom\0Gaussian\0Picking\0Ambient Occlusion\0Combined Scene Texture\0Full Blurred Texture"); ImGui::Combo("CubeMap", &m_CubeMapTexture, "Nevada(512)\0Sky(1024)"); if(m_CubeMapTexture == 0) { m_CubeMapPass->LoadTextures("Nevada"); @@ -133,6 +133,7 @@ void Renderer::Draw(RenderFrame& frame) m_DrawFinalPass->ClearBuffer(); m_DrawBloomPass->ClearBuffer(); m_SSAOPass->ClearBuffer(); + m_BlurHUDPass->ClearBuffer(); PerformanceTimer::StopTimer("Renderer-ClearBuffers"); GLERROR("ClearBuffers"); for (auto scene : frame.RenderScenes) { @@ -158,7 +159,7 @@ void Renderer::Draw(RenderFrame& frame) m_LightCullingPass->CullLights(*scene); GLERROR("LightCulling"); PerformanceTimer::StartTimerAndStopPrevious("Renderer-Draw Geometry+Light"); - m_DrawFinalPass->Draw(*scene); + m_DrawFinalPass->Draw(*scene, m_BlurHUDPass); GLERROR("Draw Geometry+Light"); //m_DrawScenePass->Draw(*scene); @@ -194,6 +195,12 @@ void Renderer::Draw(RenderFrame& frame) if (m_DebugTextureToDraw == 5) { m_DrawScreenQuadPass->Draw(m_SSAOPass->SSAOTexture()); } + if (m_DebugTextureToDraw == 6) { + m_DrawScreenQuadPass->Draw(m_DrawFinalPass->CombinedSceneTexture()); + } + if (m_DebugTextureToDraw == 7) { + m_DrawScreenQuadPass->Draw(m_DrawFinalPass->FullBlurredTexture()); + } PerformanceTimer::StopTimer("Renderer-Misc Debug Draws"); PerformanceTimer::StartTimer("Renderer-ImGuiRenderPass"); @@ -244,9 +251,10 @@ void Renderer::InitializeRenderPasses() m_LightCullingPass = new LightCullingPass(this); m_CubeMapPass = new CubeMapPass(this); m_SSAOPass = new SSAOPass(this, m_Config); + m_BlurHUDPass = new BlurHUD(this); m_DrawFinalPass = new DrawFinalPass(this, m_LightCullingPass, m_CubeMapPass, m_SSAOPass); m_DrawScreenQuadPass = new DrawScreenQuadPass(this); m_DrawBloomPass = new DrawBloomPass(this, m_Config); m_DrawColorCorrectionPass = new DrawColorCorrectionPass(this); - + } \ No newline at end of file diff --git a/src/Game/Game.cpp b/src/Game/Game.cpp index 085fb6ad..2515ab82 100644 --- a/src/Game/Game.cpp +++ b/src/Game/Game.cpp @@ -37,7 +37,8 @@ #include "Game/Systems/ScoreScreenSystem.h" #include "Game/Systems/SpectatorCameraSystem.h" #include "GUI/ButtonSystem.h" -#include "GUI/MainMenuSystem.h" +#include "Game/Systems/MainMenuSystem.h" +#include "Game/Systems/ServerListSystem.h" Game::Game(int argc, char* argv[]) @@ -151,6 +152,7 @@ Game::Game(int argc, char* argv[]) m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); m_SystemPipeline->AddSystem(updateOrderLevel); + m_SystemPipeline->AddSystem(updateOrderLevel, m_Renderer); // Populate Octree with collidables ++updateOrderLevel; m_SystemPipeline->AddSystem(updateOrderLevel, m_OctreeCollision, "Collidable"); diff --git a/src/Game/Systems/MainMenuSystem.cpp b/src/Game/Systems/MainMenuSystem.cpp new file mode 100644 index 00000000..fcb04b4f --- /dev/null +++ b/src/Game/Systems/MainMenuSystem.cpp @@ -0,0 +1,94 @@ +#include "../Game/Systems/MainMenuSystem.h" + +MainMenuSystem::MainMenuSystem(SystemParams params, IRenderer* renderer) + : System(params) + , ImpureSystem() + , m_Renderer(renderer) +{ + EVENT_SUBSCRIBE_MEMBER(m_EPressed, &MainMenuSystem::OnButtonPress); + EVENT_SUBSCRIBE_MEMBER(m_EReleased, &MainMenuSystem::OnButtonRelease); + EVENT_SUBSCRIBE_MEMBER(m_EClicked, &MainMenuSystem::OnButtonClick); + EVENT_SUBSCRIBE_MEMBER(m_EInputCommand, &MainMenuSystem::OnInputCommand); +} + +void MainMenuSystem::Update(double dt) +{ + +} + +bool MainMenuSystem::OnButtonClick(const Events::ButtonClicked& e) +{ + if (e.EntityName == "ServerIdentityConnect") { + EntityWrapper entity = e.Entity; + EntityWrapper serverIdentityEntity = entity.FirstParentWithComponent("ServerIdentity"); + if(serverIdentityEntity.Valid()) { + Events::ConnectRequest event; + event.IP = (std::string)entity["ServerIdentity"]["IP"]; + event.Port = (int)entity["ServerIdentity"]["Port"]; + printf("\n ----Request Server Connect----\nIP: %s\nPort: %i\n ------------------------------", event.IP, event.Port); + m_EventBroker->Publish(event); + } + } + return true; +} + +bool MainMenuSystem::OnButtonRelease(const Events::ButtonReleased& e) +{ + return true; +} + +bool MainMenuSystem::OnButtonPress(const Events::ButtonPressed& e) +{ + return true; +} + +bool MainMenuSystem::OnInputCommand(const Events::InputCommand& e) +{ + if(e.Command == "Play" && e.Value == 1) { + auto menus = m_World->GetComponents("Menu"); + if (menus == nullptr) { + return 0; + } + + if (m_OpenSubMenu == EntityWrapper::Invalid) { + //No submenu is open, open one. + for (auto& menu : *menus) { + EntityWrapper menuEntity = EntityWrapper(m_World, menu.EntityID); + auto serverListSpawner = menuEntity.FirstChildByName(e.Command + "Spawner"); + if (!serverListSpawner.HasComponent("Spawner")) { + return 0; + } + m_OpenSubMenu = SpawnerSystem::Spawn(serverListSpawner, serverListSpawner); + Events::SearchForServers event; + m_EventBroker->Publish(event); + break; + } + + } else if(!m_OpenSubMenu.HasComponent("ServerList")) { + //Menu is open, but not the right one, delete the old one and open a new one. + m_World->DeleteEntity(m_OpenSubMenu.ID); + m_OpenSubMenu = EntityWrapper::Invalid; + + for (auto& menu : *menus) { + EntityWrapper menuEntity = EntityWrapper(m_World, menu.EntityID); + auto serverListSpawner = menuEntity.FirstChildByName(e.Command + "Spawner"); + if (!serverListSpawner.HasComponent("Spawner")) { + return 0; + } + m_OpenSubMenu = SpawnerSystem::Spawn(serverListSpawner, serverListSpawner); + Events::SearchForServers event; + m_EventBroker->Publish(event); + break; + } + } else { + //Serverlist submenu is open, close it. + printf("\n\nMenuShit\n\n"); + m_World->DeleteEntity(m_OpenSubMenu.ID); + m_OpenSubMenu = EntityWrapper::Invalid; + } + } else if (e.Command == "RefreshServerList" && e.Value == 1){ + Events::SearchForServers event; + m_EventBroker->Publish(event); + } + return true; +} \ No newline at end of file diff --git a/src/Game/Systems/ServerListSystem.cpp b/src/Game/Systems/ServerListSystem.cpp new file mode 100644 index 00000000..f2813b64 --- /dev/null +++ b/src/Game/Systems/ServerListSystem.cpp @@ -0,0 +1,53 @@ +#include "../Game/Systems/ServerListSystem.h" + +ServerListSystem::ServerListSystem(SystemParams params, IRenderer* renderer) + : System(params) + , PureSystem("ServerList") + , m_Renderer(renderer) +{ + EVENT_SUBSCRIBE_MEMBER(m_EServerListRecieved, &ServerListSystem::OnServerListRecieved); +} + +void ServerListSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cServerList, double dt) +{ + +} + +void ServerListSystem::RefreshList() +{ + Events::SearchForServers event; + m_EventBroker->Publish(event); +} + + +bool ServerListSystem::OnServerListRecieved(const Events::DisplayServerlist& e) +{ + if (e.Serverlist.size() == 0) { + return 1; + } + auto serverLists = m_World->GetComponents("ServerList"); + if (serverLists == nullptr) + return 1; + for (auto& cServerList : *serverLists) { + EntityWrapper serverListEntity = EntityWrapper(m_World, cServerList.EntityID); + EntityWrapper identitySpawner = serverListEntity.FirstChildByName("ServerIdentitySpawner"); + identitySpawner.DeleteChildren(); + + (int&)cServerList["TotalIdentities"] = (int)e.Serverlist.size(); + for (int i = 0; i < e.Serverlist.size(); i++) { + //Create Identities for each server and place them on the right position. + EntityWrapper newIdentity = SpawnerSystem::Spawn(identitySpawner, identitySpawner); + + glm::vec3 offset = (glm::vec3)serverListEntity["ServerList"]["Offset"]; + (glm::vec3&)newIdentity["Transform"]["Position"] = offset * (float)i; + + auto& cIdentity = newIdentity["ServerIdentity"]; + (std::string&)cIdentity["IP"] = e.Serverlist[i].Address; + (std::string&)cIdentity["ServerName"] = e.Serverlist[i].Name; + (int&)cIdentity["Port"] = e.Serverlist[i].Port; + (int&)cIdentity["PlayersConnected"] = e.Serverlist[i].PlayersConnected; + } + } + + return 1; +}