Skip to content

Commit

Permalink
refactor: add virtual and override keywords to features
Browse files Browse the repository at this point in the history
  • Loading branch information
FlayaN committed Jul 19, 2024
1 parent e1c5c43 commit 2844da4
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions src/Features/CloudShadows.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ struct CloudShadows : Feature
return &singleton;
}

virtual inline std::string GetName() override { return "Cloud Shadows"; }
virtual inline std::string GetShortName() override { return "CloudShadows"; }
virtual inline std::string GetName() { return "Cloud Shadows"; }
virtual inline std::string GetShortName() { return "CloudShadows"; }
virtual inline std::string_view GetShaderDefineName() override { return "CLOUD_SHADOWS"; }
virtual inline bool HasShaderDefine(RE::BSShader::Type) override { return true; }

Expand Down
6 changes: 3 additions & 3 deletions src/Features/DynamicCubemaps.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@ struct DynamicCubemaps : Feature

virtual inline std::string GetName() { return "Dynamic Cubemaps"; }
virtual inline std::string GetShortName() { return "DynamicCubemaps"; }
inline std::string_view GetShaderDefineName() override { return "DYNAMIC_CUBEMAPS"; }
virtual inline std::string_view GetShaderDefineName() override { return "DYNAMIC_CUBEMAPS"; }
bool HasShaderDefine(RE::BSShader::Type) override { return true; };

virtual void SetupResources() override;
virtual void Reset() override;

virtual void DrawSettings();
virtual void DrawSettings() override;
virtual void DataLoaded() override;

virtual void RestoreDefaultSettings();
virtual void RestoreDefaultSettings() override;

std::vector<std::string> iniVRCubeMapSettings{
{ "bAutoWaterSilhouetteReflections:Water" }, //IniSettings 0x1eaa018
Expand Down
6 changes: 3 additions & 3 deletions src/Features/ExtendedMaterials.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct ExtendedMaterials : Feature

virtual inline std::string GetName() { return "Extended Materials"; }
virtual inline std::string GetShortName() { return "ExtendedMaterials"; }
inline std::string_view GetShaderDefineName() override { return "EXTENDED_MATERIALS"; }
virtual inline std::string_view GetShaderDefineName() override { return "EXTENDED_MATERIALS"; }

bool HasShaderDefine(RE::BSShader::Type shaderType) override;

Expand All @@ -30,12 +30,12 @@ struct ExtendedMaterials : Feature

virtual void DataLoaded() override;

virtual void DrawSettings();
virtual void DrawSettings() override;

virtual void LoadSettings(json& o_json) override;
virtual void SaveSettings(json& o_json) override;

virtual void RestoreDefaultSettings();
virtual void RestoreDefaultSettings() override;

bool SupportsVR() override { return true; };
};
6 changes: 3 additions & 3 deletions src/Features/GrassCollision.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct GrassCollision : Feature

virtual inline std::string GetName() { return "Grass Collision"; }
virtual inline std::string GetShortName() { return "GrassCollision"; }
inline std::string_view GetShaderDefineName() override { return "GRASS_COLLISION"; }
virtual inline std::string_view GetShaderDefineName() override { return "GRASS_COLLISION"; }

bool HasShaderDefine(RE::BSShader::Type shaderType) override;

Expand Down Expand Up @@ -49,14 +49,14 @@ struct GrassCollision : Feature
virtual void SetupResources() override;
virtual void Reset() override;

virtual void DrawSettings();
virtual void DrawSettings() override;
void UpdateCollisions(PerFrame& perFrame);
void Update();

virtual void LoadSettings(json& o_json) override;
virtual void SaveSettings(json& o_json) override;

virtual void RestoreDefaultSettings();
virtual void RestoreDefaultSettings() override;

virtual void PostPostLoad() override;

Expand Down
4 changes: 2 additions & 2 deletions src/Features/GrassLighting.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ struct GrassLighting : Feature

Settings settings;

virtual void DrawSettings();
virtual void DrawSettings() override;

virtual void LoadSettings(json& o_json) override;
virtual void SaveSettings(json& o_json) override;

virtual void RestoreDefaultSettings();
virtual void RestoreDefaultSettings() override;

bool SupportsVR() override { return true; };
};
6 changes: 3 additions & 3 deletions src/Features/LightLimitFix.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct LightLimitFix : Feature

virtual inline std::string GetName() { return "Light Limit Fix"; }
virtual inline std::string GetShortName() { return "LightLimitFix"; }
inline std::string_view GetShaderDefineName() override { return "LIGHT_LIMIT_FIX"; }
virtual inline std::string_view GetShaderDefineName() override { return "LIGHT_LIMIT_FIX"; }

bool HasShaderDefine(RE::BSShader::Type) override { return true; };

Expand Down Expand Up @@ -133,9 +133,9 @@ struct LightLimitFix : Feature
virtual void LoadSettings(json& o_json) override;
virtual void SaveSettings(json& o_json) override;

virtual void RestoreDefaultSettings();
virtual void RestoreDefaultSettings() override;

virtual void DrawSettings();
virtual void DrawSettings() override;

virtual void PostPostLoad() override;
virtual void DataLoaded() override;
Expand Down
4 changes: 2 additions & 2 deletions src/Features/ScreenSpaceGI.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ struct ScreenSpaceGI : Feature
return &singleton;
}

virtual inline std::string GetName() override { return "Screen Space GI"; }
virtual inline std::string GetShortName() override { return "ScreenSpaceGI"; }
virtual inline std::string GetName() { return "Screen Space GI"; }
virtual inline std::string GetShortName() { return "ScreenSpaceGI"; }

virtual void RestoreDefaultSettings() override;
virtual void DrawSettings() override;
Expand Down
6 changes: 3 additions & 3 deletions src/Features/ScreenSpaceShadows.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct ScreenSpaceShadows : Feature

virtual inline std::string GetName() { return "Screen-Space Shadows"; }
virtual inline std::string GetShortName() { return "ScreenSpaceShadows"; }
inline std::string_view GetShaderDefineName() override { return "SCREEN_SPACE_SHADOWS"; }
virtual inline std::string_view GetShaderDefineName() override { return "SCREEN_SPACE_SHADOWS"; }
bool HasShaderDefine(RE::BSShader::Type shaderType) override;

struct BendSettings
Expand Down Expand Up @@ -56,7 +56,7 @@ struct ScreenSpaceShadows : Feature

virtual void SetupResources() override;

virtual void DrawSettings();
virtual void DrawSettings() override;

virtual void ClearShaderCache() override;
ID3D11ComputeShader* GetComputeRaymarch();
Expand All @@ -69,7 +69,7 @@ struct ScreenSpaceShadows : Feature

void DrawShadows();

virtual void RestoreDefaultSettings();
virtual void RestoreDefaultSettings() override;

bool SupportsVR() override { return true; };
};
6 changes: 3 additions & 3 deletions src/Features/Skylighting.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ struct Skylighting : Feature

virtual inline std::string GetName() { return "Skylighting"; }
virtual inline std::string GetShortName() { return "Skylighting"; }
inline std::string_view GetShaderDefineName() override { return "SKYLIGHTING"; }
virtual inline std::string_view GetShaderDefineName() override { return "SKYLIGHTING"; }

bool HasShaderDefine(RE::BSShader::Type) override { return true; };

virtual void SetupResources() override;

virtual void DrawSettings();
virtual void DrawSettings() override;

virtual void LoadSettings(json& o_json) override;
virtual void SaveSettings(json& o_json) override;

virtual inline void PostPostLoad() override { Hooks::Install(); }

virtual void RestoreDefaultSettings();
virtual void RestoreDefaultSettings() override;

REX::W32::XMFLOAT4X4 viewProjMat;

Expand Down
8 changes: 4 additions & 4 deletions src/Features/SubsurfaceScattering.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ struct SubsurfaceScattering : Feature

virtual inline std::string GetName() { return "Subsurface Scattering"; }
virtual inline std::string GetShortName() { return "SubsurfaceScattering"; }
inline std::string_view GetShaderDefineName() override { return "SSS"; }
virtual inline std::string_view GetShaderDefineName() override { return "SSS"; }

bool HasShaderDefine(RE::BSShader::Type) override { return true; };

virtual void SetupResources() override;
virtual void Reset() override;
virtual void RestoreDefaultSettings();
virtual void RestoreDefaultSettings() override;

virtual void DrawSettings();
virtual void DrawSettings() override;

float3 Gaussian(DiffusionProfile& a_profile, float variance, float r);
float3 Profile(DiffusionProfile& a_profile, float r);
Expand All @@ -90,7 +90,7 @@ struct SubsurfaceScattering : Feature
virtual void LoadSettings(json& o_json) override;
virtual void SaveSettings(json& o_json) override;

virtual void ClearShaderCache();
virtual void ClearShaderCache() override;
ID3D11ComputeShader* GetComputeShaderHorizontalBlur();
ID3D11ComputeShader* GetComputeShaderVerticalBlur();

Expand Down
10 changes: 5 additions & 5 deletions src/Features/TerrainBlending.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ struct TerrainBlending : Feature

virtual inline std::string GetName() { return "Terrain Blending"; }
virtual inline std::string GetShortName() { return "TerrainBlending"; }
virtual inline std::string_view GetShaderDefineName() { return "TERRAIN_BLENDING"; }
virtual inline bool HasShaderDefine(RE::BSShader::Type) { return true; }
virtual inline std::string_view GetShaderDefineName() override { return "TERRAIN_BLENDING"; }
virtual inline bool HasShaderDefine(RE::BSShader::Type) override { return true; }

virtual void SetupResources() override;

virtual void DrawSettings();
virtual void DrawSettings() override;

ID3D11VertexShader* GetTerrainVertexShader();
ID3D11VertexShader* GetTerrainOffsetVertexShader();
Expand All @@ -31,7 +31,7 @@ struct TerrainBlending : Feature
ID3D11ComputeShader* GetDepthBlendShader();
ID3D11ComputeShader* GetDepthFixShader();

virtual void RestoreDefaultSettings();
virtual void RestoreDefaultSettings() override;
virtual void PostPostLoad() override;

bool renderDepth = false;
Expand Down Expand Up @@ -65,7 +65,7 @@ struct TerrainBlending : Feature
ID3D11ComputeShader* depthBlendShader = nullptr;
ID3D11ComputeShader* depthFixShader = nullptr;

virtual void ClearShaderCache();
virtual void ClearShaderCache() override;

struct Hooks
{
Expand Down
2 changes: 1 addition & 1 deletion src/Features/TerrainOcclusion.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct TerrainOcclusion : public Feature

virtual inline std::string GetName() { return "Terrain Occlusion"; }
virtual inline std::string GetShortName() { return "TerrainOcclusion"; }
inline std::string_view GetShaderDefineName() override { return "TERRA_OCC"; }
virtual inline std::string_view GetShaderDefineName() override { return "TERRA_OCC"; }
inline bool HasShaderDefine(RE::BSShader::Type type) override
{
return type == RE::BSShader::Type::Lighting ||
Expand Down
6 changes: 3 additions & 3 deletions src/Features/WaterCaustics.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ struct WaterCaustics : Feature

virtual inline std::string GetName() { return "Water Caustics"; }
virtual inline std::string GetShortName() { return "WaterCaustics"; }
inline std::string_view GetShaderDefineName() override { return "WATER_CAUSTICS"; }
virtual inline std::string_view GetShaderDefineName() override { return "WATER_CAUSTICS"; }

bool HasShaderDefine(RE::BSShader::Type shaderType) override;

virtual void SetupResources() override;

virtual void DrawSettings();
virtual void DrawSettings() override;

virtual void Prepass() override;

virtual void LoadSettings(json& o_json) override;
virtual void SaveSettings(json& o_json) override;

virtual void RestoreDefaultSettings();
virtual void RestoreDefaultSettings() override;

bool SupportsVR() override { return true; };
};
6 changes: 3 additions & 3 deletions src/Features/WaterParallax.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ struct WaterParallax : Feature

virtual inline std::string GetName() { return "Water Parallax"; }
virtual inline std::string GetShortName() { return "WaterParallax"; }
inline std::string_view GetShaderDefineName() override { return "WATER_PARALLAX"; }
virtual inline std::string_view GetShaderDefineName() override { return "WATER_PARALLAX"; }

bool HasShaderDefine(RE::BSShader::Type shaderType) override;

virtual void SetupResources() override;

virtual void DrawSettings();
virtual void DrawSettings() override;

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;

virtual void RestoreDefaultSettings();
virtual void RestoreDefaultSettings() override;
bool SupportsVR() override { return true; };
};
6 changes: 3 additions & 3 deletions src/Features/WetnessEffects.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct WetnessEffects : Feature

virtual inline std::string GetName() { return "Wetness Effects"; }
virtual inline std::string GetShortName() { return "WetnessEffects"; }
inline std::string_view GetShaderDefineName() override { return "WETNESS_EFFECTS"; }
virtual inline std::string_view GetShaderDefineName() override { return "WETNESS_EFFECTS"; }

bool HasShaderDefine(RE::BSShader::Type) override { return true; };

Expand Down Expand Up @@ -79,12 +79,12 @@ struct WetnessEffects : Feature

virtual void Reset() override;

virtual void DrawSettings();
virtual void DrawSettings() override;

virtual void LoadSettings(json& o_json) override;
virtual void SaveSettings(json& o_json) override;

virtual void RestoreDefaultSettings();
virtual void RestoreDefaultSettings() override;
float CalculateWeatherTransitionPercentage(float skyCurrentWeatherPct, float beginFade, bool fadeIn);
void CalculateWetness(RE::TESWeather* weather, RE::Sky* sky, float seconds, float& wetness, float& puddleWetness);

Expand Down

0 comments on commit 2844da4

Please sign in to comment.