mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-07 15:15:51 +00:00
gl_engine: --unused code
This commit is contained in:
parent
8f022b3642
commit
d8c06add22
3 changed files with 2 additions and 9 deletions
|
@ -161,9 +161,7 @@ struct GlCompositor : RenderCompositor
|
||||||
GlCompositor(const RenderRegion& box) : bbox(box) {}
|
GlCompositor(const RenderRegion& box) : bbox(box) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GL_GAUSSIAN_MAX_LEVEL 3
|
|
||||||
struct GlGaussianBlur {
|
struct GlGaussianBlur {
|
||||||
int level{};
|
|
||||||
float sigma{};
|
float sigma{};
|
||||||
float scale{};
|
float scale{};
|
||||||
float extend{};
|
float extend{};
|
||||||
|
|
|
@ -953,7 +953,6 @@ void GlRenderer::effectGaussianBlurUpdate(RenderEffectGaussianBlur* effect, cons
|
||||||
blur->sigma = effect->sigma;
|
blur->sigma = effect->sigma;
|
||||||
blur->scale = std::sqrt(transform.e11 * transform.e11 + transform.e12 * transform.e12);
|
blur->scale = std::sqrt(transform.e11 * transform.e11 + transform.e12 * transform.e12);
|
||||||
blur->extend = 2 * blur->sigma * blur->scale;
|
blur->extend = 2 * blur->sigma * blur->scale;
|
||||||
blur->level = int(GL_GAUSSIAN_MAX_LEVEL * ((effect->quality - 1) * 0.01f)) + 1;
|
|
||||||
effect->rd = blur;
|
effect->rd = blur;
|
||||||
effect->valid = true;
|
effect->valid = true;
|
||||||
}
|
}
|
||||||
|
@ -972,7 +971,6 @@ void GlRenderer::effectDropShadowUpdate(RenderEffectDropShadow* effect, const Ma
|
||||||
};
|
};
|
||||||
dropShadow->sigma = sigma;
|
dropShadow->sigma = sigma;
|
||||||
dropShadow->scale = scale;
|
dropShadow->scale = scale;
|
||||||
dropShadow->level = int(GL_GAUSSIAN_MAX_LEVEL * ((effect->quality - 1) * 0.01f)) + 1;
|
|
||||||
dropShadow->color[3] = effect->color[3] / 255.0f;
|
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:
|
//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];
|
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);
|
task->setDrawRange(ioffset, 6);
|
||||||
// add task to render pipeline
|
// add task to render pipeline
|
||||||
pass->addRenderTask(task);
|
pass->addRenderTask(task);
|
||||||
}
|
} else return false;
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -740,7 +740,6 @@ void main()
|
||||||
const char* GAUSSIAN_VERTICAL = R"(
|
const char* GAUSSIAN_VERTICAL = R"(
|
||||||
uniform sampler2D uSrcTexture;
|
uniform sampler2D uSrcTexture;
|
||||||
layout(std140) uniform Gaussian {
|
layout(std140) uniform Gaussian {
|
||||||
int level;
|
|
||||||
float sigma;
|
float sigma;
|
||||||
float scale;
|
float scale;
|
||||||
float extend;
|
float extend;
|
||||||
|
@ -776,7 +775,6 @@ void main()
|
||||||
const char* GAUSSIAN_HORIZONTAL = R"(
|
const char* GAUSSIAN_HORIZONTAL = R"(
|
||||||
uniform sampler2D uSrcTexture;
|
uniform sampler2D uSrcTexture;
|
||||||
layout(std140) uniform Gaussian {
|
layout(std140) uniform Gaussian {
|
||||||
int level;
|
|
||||||
float sigma;
|
float sigma;
|
||||||
float scale;
|
float scale;
|
||||||
float extend;
|
float extend;
|
||||||
|
@ -813,7 +811,6 @@ const char* EFFECT_DROPSHADOW = R"(
|
||||||
uniform sampler2D uSrcTexture;
|
uniform sampler2D uSrcTexture;
|
||||||
uniform sampler2D uBlrTexture;
|
uniform sampler2D uBlrTexture;
|
||||||
layout(std140) uniform DropShadow {
|
layout(std140) uniform DropShadow {
|
||||||
int level;
|
|
||||||
float sigma;
|
float sigma;
|
||||||
float scale;
|
float scale;
|
||||||
float extend;
|
float extend;
|
||||||
|
|
Loading…
Add table
Reference in a new issue