chore: Drop unused feature flags in shaders

This commit is contained in:
Vsevolod Kremianskii 2021-02-14 14:40:16 +07:00
parent 0ef7d158fe
commit 7ceecfaeae
3 changed files with 8 additions and 15 deletions

View file

@ -57,12 +57,10 @@ const int FEATURE_BUMPMAP = 0x10;
const int FEATURE_SKELETAL = 0x20;
const int FEATURE_LIGHTING = 0x40;
const int FEATURE_SELFILLUM = 0x80;
const int FEATURE_BLUR = 0x100;
const int FEATURE_BLOOM = 0x200;
const int FEATURE_DISCARD = 0x400;
const int FEATURE_SHADOWS = 0x800;
const int FEATURE_BILLBOARD = 0x1000;
const int FEATURE_WATER = 0x2000;
const int FEATURE_DISCARD = 0x100;
const int FEATURE_SHADOWS = 0x200;
const int FEATURE_BILLBOARD = 0x400;
const int FEATURE_WATER = 0x800;
struct Light {
vec4 position;

View file

@ -84,12 +84,10 @@ struct UniformFeatureFlags {
static constexpr int skeletal = 0x20;
static constexpr int lighting = 0x40;
static constexpr int selfIllum = 0x80;
static constexpr int blur = 0x100;
static constexpr int bloom = 0x200;
static constexpr int discard = 0x400;
static constexpr int shadows = 0x800;
static constexpr int billboard = 0x1000;
static constexpr int water = 0x2000;
static constexpr int discard = 0x100;
static constexpr int shadows = 0x200;
static constexpr int billboard = 0x400;
static constexpr int water = 0x800;
};
struct GeneralUniforms {

View file

@ -230,7 +230,6 @@ void WorldRenderPipeline::applyHorizontalBlur() const {
transform = glm::scale(transform, glm::vec3(w, h, 1.0f));
LocalUniforms locals;
locals.general.featureMask |= UniformFeatureFlags::blur;
locals.general.model = move(transform);
locals.general.blurResolution = glm::vec2(w, h);
locals.general.blurDirection = glm::vec2(1.0f, 0.0f);
@ -259,7 +258,6 @@ void WorldRenderPipeline::applyVerticalBlur() const {
transform = glm::scale(transform, glm::vec3(w, h, 1.0f));
LocalUniforms locals;
locals.general.featureMask |= UniformFeatureFlags::blur;
locals.general.model = move(transform);
locals.general.blurResolution = glm::vec2(_opts.width, _opts.height);
locals.general.blurDirection = glm::vec2(0.0f, 1.0f);
@ -304,7 +302,6 @@ void WorldRenderPipeline::drawResult() const {
} else {
LocalUniforms locals;
locals.general.featureMask |= UniformFeatureFlags::bloom;
locals.general.model = move(transform);
Shaders::instance().activate(ShaderProgram::SimplePresentWorld, locals);