gl_engine: --unused code

This commit is contained in:
Hermet Park 2025-07-05 10:05:03 +09:00 committed by Hermet Park
parent 8f022b3642
commit d8c06add22
3 changed files with 2 additions and 9 deletions

View file

@ -161,9 +161,7 @@ struct GlCompositor : RenderCompositor
GlCompositor(const RenderRegion& box) : bbox(box) {}
};
#define GL_GAUSSIAN_MAX_LEVEL 3
struct GlGaussianBlur {
int level{};
float sigma{};
float scale{};
float extend{};

View file

@ -953,7 +953,6 @@ void GlRenderer::effectGaussianBlurUpdate(RenderEffectGaussianBlur* effect, cons
blur->sigma = effect->sigma;
blur->scale = std::sqrt(transform.e11 * transform.e11 + transform.e12 * transform.e12);
blur->extend = 2 * blur->sigma * blur->scale;
blur->level = int(GL_GAUSSIAN_MAX_LEVEL * ((effect->quality - 1) * 0.01f)) + 1;
effect->rd = blur;
effect->valid = true;
}
@ -972,7 +971,6 @@ void GlRenderer::effectDropShadowUpdate(RenderEffectDropShadow* effect, const Ma
};
dropShadow->sigma = sigma;
dropShadow->scale = scale;
dropShadow->level = int(GL_GAUSSIAN_MAX_LEVEL * ((effect->quality - 1) * 0.01f)) + 1;
dropShadow->color[3] = effect->color[3] / 255.0f;
//Drop shadow effect applies blending in the shader (GL_BLEND disabled), so the color should be premultiplied:
dropShadow->color[0] = effect->color[0] / 255.0f * dropShadow->color[3];
@ -1189,8 +1187,8 @@ bool GlRenderer::render(TVG_UNUSED RenderCompositor* cmp, const RenderEffect* ef
task->setDrawRange(ioffset, 6);
// add task to render pipeline
pass->addRenderTask(task);
}
return false;
} else return false;
return true;
}

View file

@ -740,7 +740,6 @@ void main()
const char* GAUSSIAN_VERTICAL = R"(
uniform sampler2D uSrcTexture;
layout(std140) uniform Gaussian {
int level;
float sigma;
float scale;
float extend;
@ -776,7 +775,6 @@ void main()
const char* GAUSSIAN_HORIZONTAL = R"(
uniform sampler2D uSrcTexture;
layout(std140) uniform Gaussian {
int level;
float sigma;
float scale;
float extend;
@ -813,7 +811,6 @@ const char* EFFECT_DROPSHADOW = R"(
uniform sampler2D uSrcTexture;
uniform sampler2D uBlrTexture;
layout(std140) uniform DropShadow {
int level;
float sigma;
float scale;
float extend;