Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 43779c0738 | |||
| 27361225e0 | |||
| 1d170f28e1 |
+1
-1
Submodule assets updated: 902cbf2ba6...a66a2786e4
@@ -29,8 +29,8 @@ struct ShadowFrustum
|
|||||||
class ShadowPass
|
class ShadowPass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ShadowPass(IRenderer* renderer);
|
ShadowPass(IRenderer* renderer, bool useShadow);
|
||||||
ShadowPass(IRenderer * renderer, int ShadowResX, int ShadowResY);
|
ShadowPass(IRenderer * renderer, int ShadowResX, int ShadowResY, bool useShadow);
|
||||||
~ShadowPass();
|
~ShadowPass();
|
||||||
|
|
||||||
void InitializeFrameBuffers();
|
void InitializeFrameBuffers();
|
||||||
|
|||||||
@@ -89,3 +89,6 @@ NumIterations=6
|
|||||||
|
|
||||||
[MSAA]
|
[MSAA]
|
||||||
Level=2
|
Level=2
|
||||||
|
|
||||||
|
[Shadows]
|
||||||
|
Enable=false
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
To start a server
|
To start a server
|
||||||
|
|
||||||
1. Run "Axyz Server" from the start menu or "Server.bat" in the installation directory (C:\Program Files\Axyz)
|
1. Run Server.bat in the installation directory (C:\Program Files\Axyz)
|
||||||
2. Press F1 to open the editor mode
|
2. Press F1 to open the editor mode
|
||||||
3. Expand the Entities window if it is minimized, by double-clicking it
|
3. Expand the Entities window if it is minimized, by double-clicking it
|
||||||
4. Mark StartMenu_Origin and hit Delete twice
|
4. Mark StartMenu_Origin and hit Delete twice
|
||||||
@@ -9,7 +9,7 @@ To start a server
|
|||||||
|
|
||||||
To join a game
|
To join a game
|
||||||
|
|
||||||
1. Run "Axyz" from the start menu or "Axyz.exe" in the installation directory (C:\Program Files\Axyz)
|
1. Run Axyz from the start menu or Axyz.exe in the installation directory (C:\Program Files\Axyz)
|
||||||
2. Press Play
|
2. Press Play
|
||||||
3. Hit the refresh icon if no server is visible
|
3. Hit the refresh icon if no server is visible
|
||||||
4. Click the server you want to join
|
4. Click the server you want to join
|
||||||
|
|||||||
+9840
-9840
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -31,13 +31,22 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName>ActivateShieldU</AnimationName>
|
<AnimationName>ActivateShieldU</AnimationName>
|
||||||
<Play>true</Play>
|
|
||||||
<Loop>false</Loop>
|
<Loop>false</Loop>
|
||||||
</c:Animation>
|
</c:Animation>
|
||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</Entity>
|
||||||
|
<Entity name="Idle">
|
||||||
|
<Components>
|
||||||
|
<c:Animation>
|
||||||
|
<AnimationName>ShieldFrontU</AnimationName>
|
||||||
|
<Play>true</Play>
|
||||||
|
</c:Animation>
|
||||||
|
<c:Transform/>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
</Children>
|
</Children>
|
||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="Front">
|
<Entity name="Front">
|
||||||
@@ -65,7 +74,16 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName>ActivateShieldU</AnimationName>
|
<AnimationName>ActivateShieldU</AnimationName>
|
||||||
<Play>true</Play>
|
<Loop>false</Loop>
|
||||||
|
</c:Animation>
|
||||||
|
<c:Transform/>
|
||||||
|
</Components>
|
||||||
|
<Children/>
|
||||||
|
</Entity>
|
||||||
|
<Entity name="Idle">
|
||||||
|
<Components>
|
||||||
|
<c:Animation>
|
||||||
|
<AnimationName>ShieldFrontU</AnimationName>
|
||||||
<Loop>false</Loop>
|
<Loop>false</Loop>
|
||||||
</c:Animation>
|
</c:Animation>
|
||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
|
|||||||
+5622
-14216
File diff suppressed because it is too large
Load Diff
@@ -54,7 +54,6 @@ Source: "..\..\resources\DefaultConfig.ini"; DestDir: "{app}"; Flags: ignorevers
|
|||||||
Source: "..\..\resources\DefaultInput.ini"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\..\resources\DefaultInput.ini"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\..\bin\glew32.dll"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\..\bin\glew32.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\..\bin\glfw3.dll"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\..\bin\glfw3.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\..\bin\OpenAL32.dll"; DestDir: "{app}"; Flags: ignoreversion
|
|
||||||
Source: "..\..\bin\imgui.ini"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\..\bin\imgui.ini"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\..\bin\Input.ini"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\..\bin\Input.ini"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\..\bin\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\..\bin\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
@@ -68,8 +67,6 @@ Source: "..\..\deps\redist\VC_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteaf
|
|||||||
[Icons]
|
[Icons]
|
||||||
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||||
Name: "{commonprograms}\{#MyAppName} Server"; Filename: "{app}\{#MyAppExeName}"; Parameters: "--server"
|
|
||||||
Name: "{commondesktop}\{#MyAppName} Server"; Filename: "{app}\{#MyAppExeName}"; Parameters: "--server"; Tasks: desktopicon
|
|
||||||
|
|
||||||
[INI]
|
[INI]
|
||||||
Filename: "{app}\Config.ini"; Section: "Networking"; Key: "Name"; String: "{%USERNAME}"; Flags: createkeyifdoesntexist
|
Filename: "{app}\Config.ini"; Section: "Networking"; Key: "Name"; String: "{%USERNAME}"; Flags: createkeyifdoesntexist
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ void Renderer::InitializeRenderPasses()
|
|||||||
m_LightCullingPass = new LightCullingPass(this);
|
m_LightCullingPass = new LightCullingPass(this);
|
||||||
m_CubeMapPass = new CubeMapPass(this);
|
m_CubeMapPass = new CubeMapPass(this);
|
||||||
m_SSAOPass = new SSAOPass(this, m_Config);
|
m_SSAOPass = new SSAOPass(this, m_Config);
|
||||||
m_ShadowPass = new ShadowPass(this);
|
m_ShadowPass = new ShadowPass(this, m_Config->Get<bool>("Shadows.Enable", false));
|
||||||
m_BlurHUDPass = new BlurHUD(this);
|
m_BlurHUDPass = new BlurHUD(this);
|
||||||
m_DrawFinalPass = new DrawFinalPass(this, m_LightCullingPass, m_CubeMapPass, m_SSAOPass, m_ShadowPass, m_Config);
|
m_DrawFinalPass = new DrawFinalPass(this, m_LightCullingPass, m_CubeMapPass, m_SSAOPass, m_ShadowPass, m_Config);
|
||||||
m_DrawScreenQuadPass = new DrawScreenQuadPass(this);
|
m_DrawScreenQuadPass = new DrawScreenQuadPass(this);
|
||||||
|
|||||||
@@ -1,21 +1,84 @@
|
|||||||
#include "Rendering/ShadowPass.h"
|
#include "Rendering/ShadowPass.h"
|
||||||
|
|
||||||
ShadowPass::ShadowPass(IRenderer * renderer, int shadow_res_x, int shadow_res_y)
|
ShadowPass::ShadowPass(IRenderer * renderer, int shadow_res_x, int shadow_res_y, bool useShadow)
|
||||||
{
|
{
|
||||||
m_Renderer = renderer;
|
m_EnableShadows = useShadow;
|
||||||
m_ResolutionSizeWidth = shadow_res_x;
|
if (useShadow) {
|
||||||
m_ResolutionSizeHeight = shadow_res_y;
|
m_Renderer = renderer;
|
||||||
|
m_ResolutionSizeWidth = shadow_res_x;
|
||||||
|
m_ResolutionSizeHeight = shadow_res_y;
|
||||||
|
|
||||||
InitializeFrameBuffers();
|
InitializeFrameBuffers();
|
||||||
InitializeShaderPrograms();
|
InitializeShaderPrograms();
|
||||||
|
} else {
|
||||||
|
glGenTextures(1, &m_DepthMap);
|
||||||
|
|
||||||
|
glBindTexture(GL_TEXTURE_2D_ARRAY, m_DepthMap);
|
||||||
|
glTexStorage3D(GL_TEXTURE_2D_ARRAY, 1, GL_DEPTH_COMPONENT16, 1, 1, m_CurrentNrOfSplits);
|
||||||
|
|
||||||
|
//glTexSubImage3D(GL_TEXTURE_2D_ARRAY, 0, 0, 0, 0, m_ResolutionSizeWidth, m_ResolutionSizeHeight, m_CurrentNrOfSplits, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr);
|
||||||
|
|
||||||
|
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
|
||||||
|
glTexParameterfv(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BORDER_COLOR, glm::vec4(1.f).data);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
|
||||||
|
|
||||||
|
m_DepthBuffer.AddResource(std::shared_ptr<BufferResource>(new Texture2DArray(&m_DepthMap, GL_DEPTH_ATTACHMENT)));
|
||||||
|
m_DepthBuffer.Generate();
|
||||||
|
|
||||||
|
m_DepthBuffer.Bind();
|
||||||
|
|
||||||
|
for (int i = 0; i < m_CurrentNrOfSplits; i++) {
|
||||||
|
glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, m_DepthMap, 0, i);
|
||||||
|
|
||||||
|
glClear(GL_DEPTH_BUFFER_BIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_DepthBuffer.Unbind();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ShadowPass::ShadowPass(IRenderer * renderer)
|
ShadowPass::ShadowPass(IRenderer * renderer, bool useShadow)
|
||||||
{
|
{
|
||||||
m_Renderer = renderer;
|
m_EnableShadows = useShadow;
|
||||||
|
if (useShadow) {
|
||||||
|
m_Renderer = renderer;
|
||||||
|
|
||||||
InitializeFrameBuffers();
|
InitializeFrameBuffers();
|
||||||
InitializeShaderPrograms();
|
InitializeShaderPrograms();
|
||||||
|
} else {
|
||||||
|
glGenTextures(1, &m_DepthMap);
|
||||||
|
|
||||||
|
glBindTexture(GL_TEXTURE_2D_ARRAY, m_DepthMap);
|
||||||
|
glTexStorage3D(GL_TEXTURE_2D_ARRAY, 1, GL_DEPTH_COMPONENT16, 1, 1, m_CurrentNrOfSplits);
|
||||||
|
|
||||||
|
//glTexSubImage3D(GL_TEXTURE_2D_ARRAY, 0, 0, 0, 0, m_ResolutionSizeWidth, m_ResolutionSizeHeight, m_CurrentNrOfSplits, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr);
|
||||||
|
|
||||||
|
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
|
||||||
|
glTexParameterfv(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BORDER_COLOR, glm::vec4(1.f).data);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
|
||||||
|
|
||||||
|
m_DepthBuffer.AddResource(std::shared_ptr<BufferResource>(new Texture2DArray(&m_DepthMap, GL_DEPTH_ATTACHMENT)));
|
||||||
|
m_DepthBuffer.Generate();
|
||||||
|
|
||||||
|
m_DepthBuffer.Bind();
|
||||||
|
|
||||||
|
for (int i = 0; i < m_CurrentNrOfSplits; i++) {
|
||||||
|
glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, m_DepthMap, 0, i);
|
||||||
|
|
||||||
|
glClear(GL_DEPTH_BUFFER_BIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_DepthBuffer.Unbind();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ShadowPass::~ShadowPass()
|
ShadowPass::~ShadowPass()
|
||||||
@@ -120,7 +183,6 @@ float ShadowPass::FindRadius(ShadowFrustum& frustum)
|
|||||||
radius = distance;
|
radius = distance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
frustum.Radius = radius;
|
frustum.Radius = radius;
|
||||||
return radius;
|
return radius;
|
||||||
}
|
}
|
||||||
@@ -168,15 +230,17 @@ void ShadowPass::InitializeShaderPrograms()
|
|||||||
|
|
||||||
void ShadowPass::ClearBuffer()
|
void ShadowPass::ClearBuffer()
|
||||||
{
|
{
|
||||||
m_DepthBuffer.Bind();
|
if (m_EnableShadows) {
|
||||||
|
m_DepthBuffer.Bind();
|
||||||
|
|
||||||
for (int i = 0; i < m_CurrentNrOfSplits; i++) {
|
for (int i = 0; i < m_CurrentNrOfSplits; i++) {
|
||||||
glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, m_DepthMap, 0, i);
|
glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, m_DepthMap, 0, i);
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_DepthBuffer.Unbind();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_DepthBuffer.Unbind();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShadowPass::PointsToLightspace(ShadowFrustum& frustum, glm::mat4 v)
|
void ShadowPass::PointsToLightspace(ShadowFrustum& frustum, glm::mat4 v)
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ Texture::Texture(std::string path)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Master hade PNG release here...
|
|
||||||
|
|
||||||
// Construct the OpenGL texture
|
// Construct the OpenGL texture
|
||||||
glGenTextures(1, &m_Texture);
|
glGenTextures(1, &m_Texture);
|
||||||
glBindTexture(GL_TEXTURE_2D, m_Texture);
|
glBindTexture(GL_TEXTURE_2D, m_Texture);
|
||||||
|
|||||||
@@ -160,9 +160,9 @@ bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SpawnerSystem::Spawn(attachment, attachment);
|
if (IsServer) {
|
||||||
|
SpawnerSystem::Spawn(attachment, attachment);
|
||||||
/*
|
}
|
||||||
|
|
||||||
EntityWrapper backAttachment = attachment.FirstChildByName("Back");
|
EntityWrapper backAttachment = attachment.FirstChildByName("Back");
|
||||||
if (backAttachment.Valid()) {
|
if (backAttachment.Valid()) {
|
||||||
@@ -172,11 +172,7 @@ bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInf
|
|||||||
eDeployShieldAttachement.Restart = true;
|
eDeployShieldAttachement.Restart = true;
|
||||||
eDeployShieldAttachement.Start = true;
|
eDeployShieldAttachement.Start = true;
|
||||||
m_EventBroker->Publish(eDeployShieldAttachement);
|
m_EventBroker->Publish(eDeployShieldAttachement);
|
||||||
} else {
|
|
||||||
LOG_ERROR("back shield invalid");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EntityWrapper frontAttachment = attachment.FirstChildByName("Front");
|
EntityWrapper frontAttachment = attachment.FirstChildByName("Front");
|
||||||
if (frontAttachment.Valid()) {
|
if (frontAttachment.Valid()) {
|
||||||
Events::AutoAnimationBlend eDeployShieldAttachement;
|
Events::AutoAnimationBlend eDeployShieldAttachement;
|
||||||
@@ -186,10 +182,7 @@ bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInf
|
|||||||
eDeployShieldAttachement.Start = true;
|
eDeployShieldAttachement.Start = true;
|
||||||
m_EventBroker->Publish(eDeployShieldAttachement);
|
m_EventBroker->Publish(eDeployShieldAttachement);
|
||||||
|
|
||||||
} else {
|
|
||||||
LOG_ERROR("front shield invalid");
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
if (IsClient) {
|
if (IsClient) {
|
||||||
EntityWrapper root = wi.FirstPersonEntity;
|
EntityWrapper root = wi.FirstPersonEntity;
|
||||||
|
|||||||
Reference in New Issue
Block a user