From d44d5d469cb73a85c66fb0a903281ffc8566ca94 Mon Sep 17 00:00:00 2001 From: FlayaN Date: Tue, 23 Jul 2024 17:10:18 +0200 Subject: [PATCH] refactor: remove feature-Draw and remove empty functions --- src/Feature.h | 1 - src/Features/CloudShadows.h | 2 +- src/Features/DynamicCubemaps.h | 2 +- src/Features/ExtendedMaterials.h | 2 +- src/Features/GrassCollision.h | 2 +- src/Features/GrassLighting.h | 2 +- src/Features/LightLimitFix.h | 2 +- src/Features/ScreenSpaceShadows.h | 2 +- src/Features/SubsurfaceScattering.cpp | 5 +---- src/Features/SubsurfaceScattering.h | 4 +--- src/Features/TerrainBlending.h | 2 +- src/Features/TerrainOcclusion.h | 2 +- src/Features/WaterCaustics.cpp | 8 -------- src/Features/WaterCaustics.h | 6 +----- src/Features/WaterParallax.cpp | 19 ------------------- src/Features/WaterParallax.h | 9 +-------- src/Features/WetnessEffects.h | 2 +- 17 files changed, 14 insertions(+), 58 deletions(-) diff --git a/src/Feature.h b/src/Feature.h index d8f0669a0..d88c468c4 100644 --- a/src/Feature.h +++ b/src/Feature.h @@ -22,7 +22,6 @@ struct Feature virtual void Reset() {} virtual void DrawSettings() {} - virtual void Draw(const RE::BSShader*, const uint32_t) {} virtual void DrawDeferred() {} virtual void DrawPreProcess() {} virtual void Prepass() {} diff --git a/src/Features/CloudShadows.h b/src/Features/CloudShadows.h index c9632ce13..b30a8b869 100644 --- a/src/Features/CloudShadows.h +++ b/src/Features/CloudShadows.h @@ -51,5 +51,5 @@ struct CloudShadows : Feature logger::info("[Cloud Shadows] Installed hooks"); } }; - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; }; diff --git a/src/Features/DynamicCubemaps.h b/src/Features/DynamicCubemaps.h index 4b0f46f0d..d1b49cd18 100644 --- a/src/Features/DynamicCubemaps.h +++ b/src/Features/DynamicCubemaps.h @@ -126,5 +126,5 @@ struct DynamicCubemaps : Feature void Irradiance(bool a_reflections); - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; }; diff --git a/src/Features/ExtendedMaterials.h b/src/Features/ExtendedMaterials.h index e9a7b6639..751987736 100644 --- a/src/Features/ExtendedMaterials.h +++ b/src/Features/ExtendedMaterials.h @@ -37,5 +37,5 @@ struct ExtendedMaterials : Feature virtual void RestoreDefaultSettings() override; - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; }; diff --git a/src/Features/GrassCollision.h b/src/Features/GrassCollision.h index 2e3fb6b08..f6d72834c 100644 --- a/src/Features/GrassCollision.h +++ b/src/Features/GrassCollision.h @@ -60,7 +60,7 @@ struct GrassCollision : Feature virtual void PostPostLoad() override; - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; struct Hooks { diff --git a/src/Features/GrassLighting.h b/src/Features/GrassLighting.h index 13ecc408b..1ed6bd7cb 100644 --- a/src/Features/GrassLighting.h +++ b/src/Features/GrassLighting.h @@ -32,5 +32,5 @@ struct GrassLighting : Feature virtual void RestoreDefaultSettings() override; - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; }; diff --git a/src/Features/LightLimitFix.h b/src/Features/LightLimitFix.h index 3ddf35923..fecf60575 100644 --- a/src/Features/LightLimitFix.h +++ b/src/Features/LightLimitFix.h @@ -308,7 +308,7 @@ struct LightLimitFix : Feature } }; - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; }; template <> diff --git a/src/Features/ScreenSpaceShadows.h b/src/Features/ScreenSpaceShadows.h index 6682e6b36..faa64ca35 100644 --- a/src/Features/ScreenSpaceShadows.h +++ b/src/Features/ScreenSpaceShadows.h @@ -71,5 +71,5 @@ struct ScreenSpaceShadows : Feature virtual void RestoreDefaultSettings() override; - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; }; diff --git a/src/Features/SubsurfaceScattering.cpp b/src/Features/SubsurfaceScattering.cpp index 8b21a1415..85847c3ed 100644 --- a/src/Features/SubsurfaceScattering.cpp +++ b/src/Features/SubsurfaceScattering.cpp @@ -1,3 +1,4 @@ + #include "SubsurfaceScattering.h" #include "Deferred.h" @@ -240,10 +241,6 @@ void SubsurfaceScattering::DrawSSS() context->CSSetShader(shader, nullptr, 0); } -void SubsurfaceScattering::Draw(const RE::BSShader*, const uint32_t) -{ -} - void SubsurfaceScattering::SetupResources() { { diff --git a/src/Features/SubsurfaceScattering.h b/src/Features/SubsurfaceScattering.h index cf835b4d1..83536e887 100644 --- a/src/Features/SubsurfaceScattering.h +++ b/src/Features/SubsurfaceScattering.h @@ -83,8 +83,6 @@ struct SubsurfaceScattering : Feature void DrawSSS(); - virtual void Draw(const RE::BSShader* shader, const uint32_t descriptor) override; - virtual void LoadSettings(json& o_json) override; virtual void SaveSettings(json& o_json) override; @@ -117,5 +115,5 @@ struct SubsurfaceScattering : Feature } }; - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; }; diff --git a/src/Features/TerrainBlending.h b/src/Features/TerrainBlending.h index f2c5ce0f9..77a87c2d8 100644 --- a/src/Features/TerrainBlending.h +++ b/src/Features/TerrainBlending.h @@ -180,5 +180,5 @@ struct TerrainBlending : Feature logger::info("[Terrain Blending] Installed hooks"); } }; - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; }; diff --git a/src/Features/TerrainOcclusion.h b/src/Features/TerrainOcclusion.h index 1120b5df8..c1edae757 100644 --- a/src/Features/TerrainOcclusion.h +++ b/src/Features/TerrainOcclusion.h @@ -124,5 +124,5 @@ struct TerrainOcclusion : public Feature virtual inline void RestoreDefaultSettings() override { settings = {}; } virtual void ClearShaderCache() override; - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; }; \ No newline at end of file diff --git a/src/Features/WaterCaustics.cpp b/src/Features/WaterCaustics.cpp index 654a4728c..7c9a16276 100644 --- a/src/Features/WaterCaustics.cpp +++ b/src/Features/WaterCaustics.cpp @@ -5,10 +5,6 @@ #include -void WaterCaustics::DrawSettings() -{ -} - void WaterCaustics::SetupResources() { auto& device = State::GetSingleton()->device; @@ -23,10 +19,6 @@ void WaterCaustics::Prepass() context->PSSetShaderResources(70, 1, &causticsView); } -void WaterCaustics::RestoreDefaultSettings() -{ -} - bool WaterCaustics::HasShaderDefine(RE::BSShader::Type) { return true; diff --git a/src/Features/WaterCaustics.h b/src/Features/WaterCaustics.h index 24e30e3ce..32400c0ac 100644 --- a/src/Features/WaterCaustics.h +++ b/src/Features/WaterCaustics.h @@ -21,11 +21,7 @@ struct WaterCaustics : Feature virtual void SetupResources() override; - virtual void DrawSettings() override; - virtual void Prepass() override; - virtual void RestoreDefaultSettings() override; - - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; }; diff --git a/src/Features/WaterParallax.cpp b/src/Features/WaterParallax.cpp index 416221fe1..f987b4429 100644 --- a/src/Features/WaterParallax.cpp +++ b/src/Features/WaterParallax.cpp @@ -1,24 +1,5 @@ #include "WaterParallax.h" -#include "State.h" -#include "Util.h" - -void WaterParallax::DrawSettings() -{ -} - -void WaterParallax::Draw(const RE::BSShader*, const uint32_t) -{ -} - -void WaterParallax::SetupResources() -{ -} - -void WaterParallax::RestoreDefaultSettings() -{ -} - bool WaterParallax::HasShaderDefine(RE::BSShader::Type) { return true; diff --git a/src/Features/WaterParallax.h b/src/Features/WaterParallax.h index 4983fd3ee..a28cd9a7c 100644 --- a/src/Features/WaterParallax.h +++ b/src/Features/WaterParallax.h @@ -17,12 +17,5 @@ struct WaterParallax : Feature bool HasShaderDefine(RE::BSShader::Type shaderType) override; - virtual void SetupResources() override; - - virtual void DrawSettings() override; - - virtual void Draw(const RE::BSShader* shader, const uint32_t descriptor) override; - - virtual void RestoreDefaultSettings() override; - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; }; diff --git a/src/Features/WetnessEffects.h b/src/Features/WetnessEffects.h index f61f5cc81..cfefcdd0f 100644 --- a/src/Features/WetnessEffects.h +++ b/src/Features/WetnessEffects.h @@ -97,5 +97,5 @@ struct WetnessEffects : Feature } }; - bool SupportsVR() override { return true; }; + virtual bool SupportsVR() override { return true; }; };