Skip to content

Commit

Permalink
Remove FidelityFX (#38)
Browse files Browse the repository at this point in the history
Update submodule
  • Loading branch information
Pursche authored Jul 30, 2024
1 parent eaab6d4 commit 997d10e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Source/Game/Game.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local mod = Solution.Util.CreateModuleTable("Game", { "base", "fileformat", "input", "network", "gameplay", "renderer", "luau-compiler", "luau-vm", "jolt", "enkits", "refl-cpp", "utfcpp", "base64", "fidelityfx" })
local mod = Solution.Util.CreateModuleTable("Game", { "base", "fileformat", "input", "network", "gameplay", "renderer", "luau-compiler", "luau-vm", "jolt", "enkits", "refl-cpp", "utfcpp", "base64" })

Solution.Util.CreateStaticLib(mod.Name, Solution.Projects.Current.BinDir, mod.Dependencies, function()
local defines = { "_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS", "_SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS", "WIN32_LEAN_AND_MEAN", "NOMINMAX" }
Expand Down
13 changes: 6 additions & 7 deletions Source/Game/Game/Rendering/Effect/EffectRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <Renderer/RenderGraph.h>

#include <entt/entt.hpp>
#include <FidelityFX/host/ffx_cacao.h>

AutoCVar_ShowFlag CVAR_EnablePostProcessing(CVarCategory::Client | CVarCategory::Rendering, "enablePostProcessing", "Enable post processing effects", ShowFlag::ENABLED, CVarFlags::None);

Expand Down Expand Up @@ -48,7 +47,7 @@ EffectRenderer::~EffectRenderer()

void EffectRenderer::Update(f32 deltaTime)
{
vec2 renderSize = _renderer->GetRenderSize();
/*vec2 renderSize = _renderer->GetRenderSize();
if (_lastRenderSize != renderSize)
{
_lastRenderSize = renderSize;
Expand Down Expand Up @@ -96,12 +95,12 @@ void EffectRenderer::Update(f32 deltaTime)
_cacaoSettings->temporalSupersamplingRadiusOffset = CVAR_SsaoTemporalSupersamplingRadiusOffset.GetFloat();
_cacaoSettings->detailShadowStrength = CVAR_SsaoDetailShadowStrength.GetFloat();
_cacaoSettings->bilateralSigmaSquared = CVAR_SsaoBilateralSigmaSquared.GetFloat();
_cacaoSettings->bilateralSimilarityDistanceSigma = CVAR_SsaoBilateralSimilarityDistanceSigma.GetFloat();
_cacaoSettings->bilateralSimilarityDistanceSigma = CVAR_SsaoBilateralSimilarityDistanceSigma.GetFloat();*/
}

void EffectRenderer::AddSSAOPass(Renderer::RenderGraph* renderGraph, RenderResources& resources, u8 frameIndex)
{
if (CVAR_EnablePostProcessing.Get() == ShowFlag::DISABLED)
/*if (CVAR_EnablePostProcessing.Get() == ShowFlag::DISABLED)
return;
bool enableSSAO = CVAR_EnableSSAO.Get() == ShowFlag::ENABLED && _cacaoContext != nullptr;
Expand Down Expand Up @@ -149,13 +148,13 @@ void EffectRenderer::AddSSAOPass(Renderer::RenderGraph* renderGraph, RenderResou
const f32 normalUnpackAdd = -1.0f;
commandList.DispatchCacao(_cacaoContext, data.depth, data.packedNormals, data.output, &_proj, &_normalsWorldToView, normalUnpackMul, normalUnpackAdd);
});
}
}*/

}

void EffectRenderer::CreatePermanentResources()
{
_cacaoSettings = new FfxCacaoSettings();
/*_cacaoSettings = new FfxCacaoSettings();
memcpy(_cacaoSettings, &FFX_CACAO_DEFAULT_SETTINGS, sizeof(FfxCacaoSettings));
_cacaoSettings->generateNormals = false;
_cacaoSettings->generateNormals = false;*/
}
8 changes: 4 additions & 4 deletions Source/Game/Game/Rendering/Effect/EffectRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace Renderer
}

struct RenderResources;
struct FfxCacaoContext;
struct FfxCacaoSettings;
//struct FfxCacaoContext;
//struct FfxCacaoSettings;

class EffectRenderer
{
Expand All @@ -32,8 +32,8 @@ class EffectRenderer
private:
Renderer::Renderer* _renderer;

FfxCacaoContext* _cacaoContext = nullptr;
FfxCacaoSettings* _cacaoSettings = nullptr;
//FfxCacaoContext* _cacaoContext = nullptr;
//FfxCacaoSettings* _cacaoSettings = nullptr;

mat4x4 _proj;
mat4x4 _normalsWorldToView;
Expand Down
2 changes: 1 addition & 1 deletion Submodules/Engine

0 comments on commit 997d10e

Please sign in to comment.