Skip to content

Commit

Permalink
refactor: remove feature-Draw and remove empty functions
Browse files Browse the repository at this point in the history
  • Loading branch information
FlayaN committed Jul 23, 2024
1 parent b66151d commit d44d5d4
Show file tree
Hide file tree
Showing 17 changed files with 14 additions and 58 deletions.
1 change: 0 additions & 1 deletion src/Feature.h
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
Expand Down
2 changes: 1 addition & 1 deletion src/Features/CloudShadows.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ struct CloudShadows : Feature
logger::info("[Cloud Shadows] Installed hooks");
}
};
bool SupportsVR() override { return true; };
virtual bool SupportsVR() override { return true; };
};
2 changes: 1 addition & 1 deletion src/Features/DynamicCubemaps.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,5 @@ struct DynamicCubemaps : Feature

void Irradiance(bool a_reflections);

bool SupportsVR() override { return true; };
virtual bool SupportsVR() override { return true; };
};
2 changes: 1 addition & 1 deletion src/Features/ExtendedMaterials.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ struct ExtendedMaterials : Feature

virtual void RestoreDefaultSettings() override;

bool SupportsVR() override { return true; };
virtual bool SupportsVR() override { return true; };
};
2 changes: 1 addition & 1 deletion src/Features/GrassCollision.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct GrassCollision : Feature

virtual void PostPostLoad() override;

bool SupportsVR() override { return true; };
virtual bool SupportsVR() override { return true; };

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

virtual void RestoreDefaultSettings() override;

bool SupportsVR() override { return true; };
virtual bool SupportsVR() override { return true; };
};
2 changes: 1 addition & 1 deletion src/Features/LightLimitFix.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ struct LightLimitFix : Feature
}
};

bool SupportsVR() override { return true; };
virtual bool SupportsVR() override { return true; };
};

template <>
Expand Down
2 changes: 1 addition & 1 deletion src/Features/ScreenSpaceShadows.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ struct ScreenSpaceShadows : Feature

virtual void RestoreDefaultSettings() override;

bool SupportsVR() override { return true; };
virtual bool SupportsVR() override { return true; };
};
5 changes: 1 addition & 4 deletions src/Features/SubsurfaceScattering.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#include "SubsurfaceScattering.h"

#include "Deferred.h"
Expand Down Expand Up @@ -240,10 +241,6 @@ void SubsurfaceScattering::DrawSSS()
context->CSSetShader(shader, nullptr, 0);
}

void SubsurfaceScattering::Draw(const RE::BSShader*, const uint32_t)
{
}

void SubsurfaceScattering::SetupResources()
{
{
Expand Down
4 changes: 1 addition & 3 deletions src/Features/SubsurfaceScattering.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -117,5 +115,5 @@ struct SubsurfaceScattering : Feature
}
};

bool SupportsVR() override { return true; };
virtual bool SupportsVR() override { return true; };
};
2 changes: 1 addition & 1 deletion src/Features/TerrainBlending.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,5 @@ struct TerrainBlending : Feature
logger::info("[Terrain Blending] Installed hooks");
}
};
bool SupportsVR() override { return true; };
virtual bool SupportsVR() override { return true; };
};
2 changes: 1 addition & 1 deletion src/Features/TerrainOcclusion.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; };
};
8 changes: 0 additions & 8 deletions src/Features/WaterCaustics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@

#include <DDSTextureLoader.h>

void WaterCaustics::DrawSettings()
{
}

void WaterCaustics::SetupResources()
{
auto& device = State::GetSingleton()->device;
Expand All @@ -23,10 +19,6 @@ void WaterCaustics::Prepass()
context->PSSetShaderResources(70, 1, &causticsView);
}

void WaterCaustics::RestoreDefaultSettings()
{
}

bool WaterCaustics::HasShaderDefine(RE::BSShader::Type)
{
return true;
Expand Down
6 changes: 1 addition & 5 deletions src/Features/WaterCaustics.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; };
};
19 changes: 0 additions & 19 deletions src/Features/WaterParallax.cpp
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
9 changes: 1 addition & 8 deletions src/Features/WaterParallax.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; };
};
2 changes: 1 addition & 1 deletion src/Features/WetnessEffects.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@ struct WetnessEffects : Feature
}
};

bool SupportsVR() override { return true; };
virtual bool SupportsVR() override { return true; };
};

0 comments on commit d44d5d4

Please sign in to comment.