summaryrefslogtreecommitdiffstats
path: root/src/Runtime/res
diff options
context:
space:
mode:
Diffstat (limited to 'src/Runtime/res')
-rw-r--r--src/Runtime/res/effectlib/distancefieldtext.vert3
-rw-r--r--src/Runtime/res/effectlib/distancefieldtext_core.vert3
-rw-r--r--src/Runtime/res/effectlib/distancefieldtext_dropshadow.frag2
-rw-r--r--src/Runtime/res/effectlib/distancefieldtext_dropshadow.vert3
-rw-r--r--src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.frag2
-rw-r--r--src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.vert3
6 files changed, 6 insertions, 10 deletions
diff --git a/src/Runtime/res/effectlib/distancefieldtext.vert b/src/Runtime/res/effectlib/distancefieldtext.vert
index a3feb378..01024c6b 100644
--- a/src/Runtime/res/effectlib/distancefieldtext.vert
+++ b/src/Runtime/res/effectlib/distancefieldtext.vert
@@ -1,5 +1,4 @@
uniform highp mat4 mvp;
-uniform highp mat4 modelView;
uniform highp float fontScale;
uniform int textureWidth;
uniform int textureHeight;
@@ -59,7 +58,7 @@ highp float determinant(highp mat4 m)
void main()
{
- highp float scale = fontScale * sqrt(abs(determinant(modelView)));
+ highp float scale = fontScale * sqrt(abs(determinant(mvp)));
alphas = alphaRange(scale);
sampleCoord = tCoord * vec2(1.0 / highp float(textureWidth), 1.0 / highp float(textureHeight));
gl_Position = mvp * vec4(vCoord, 1.0);
diff --git a/src/Runtime/res/effectlib/distancefieldtext_core.vert b/src/Runtime/res/effectlib/distancefieldtext_core.vert
index 1ced295c..ce6a165c 100644
--- a/src/Runtime/res/effectlib/distancefieldtext_core.vert
+++ b/src/Runtime/res/effectlib/distancefieldtext_core.vert
@@ -6,7 +6,6 @@ out vec2 sampleCoord;
out vec2 alphas;
uniform mat4 mvp;
-uniform mat4 modelView;
uniform int textureWidth;
uniform int textureHeight;
uniform float fontScale;
@@ -37,7 +36,7 @@ vec2 alphaRange(float scale)
void main()
{
- float scale = fontScale * sqrt(abs(determinant(modelView)));
+ float scale = fontScale * sqrt(abs(determinant(mvp)));
alphas = alphaRange(scale);
sampleCoord = tCoord * vec2(1.0 / float(textureWidth), 1.0 / float(textureHeight));
gl_Position = mvp * vec4(vCoord, 1.0);
diff --git a/src/Runtime/res/effectlib/distancefieldtext_dropshadow.frag b/src/Runtime/res/effectlib/distancefieldtext_dropshadow.frag
index da51c5c2..94b277cd 100644
--- a/src/Runtime/res/effectlib/distancefieldtext_dropshadow.frag
+++ b/src/Runtime/res/effectlib/distancefieldtext_dropshadow.frag
@@ -15,7 +15,7 @@ void main()
clamp(shadowSampleCoord,
normalizedTextureBounds.xy,
normalizedTextureBounds.zw)).a);
- highp vec4 shadowPixel = shadowColor * shadowAlpha;
+ highp vec4 shadowPixel = color * shadowColor * shadowAlpha;
highp float textAlpha = smoothstep(alphas.x,
alphas.y,
diff --git a/src/Runtime/res/effectlib/distancefieldtext_dropshadow.vert b/src/Runtime/res/effectlib/distancefieldtext_dropshadow.vert
index f645eb8c..f633aaa5 100644
--- a/src/Runtime/res/effectlib/distancefieldtext_dropshadow.vert
+++ b/src/Runtime/res/effectlib/distancefieldtext_dropshadow.vert
@@ -1,5 +1,4 @@
uniform highp mat4 mvp;
-uniform highp mat4 modelView;
uniform highp float fontScale;
uniform int textureWidth;
uniform int textureHeight;
@@ -63,7 +62,7 @@ highp float determinant(highp mat4 m)
void main()
{
- highp float scale = fontScale * sqrt(abs(determinant(modelView)));
+ highp float scale = fontScale * sqrt(abs(determinant(mvp)));
alphas = alphaRange(scale);
highp vec2 textureSizeMultiplier = vec2(1.0 / highp float(textureWidth),
diff --git a/src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.frag b/src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.frag
index 304b1874..4e46bd5f 100644
--- a/src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.frag
+++ b/src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.frag
@@ -18,7 +18,7 @@ void main()
clamp(shadowSampleCoord,
normalizedTextureBounds.xy,
normalizedTextureBounds.zw)).r);
- vec4 shadowPixel = shadowColor * shadowAlpha;
+ vec4 shadowPixel = color * shadowColor * shadowAlpha;
float textAlpha = smoothstep(alphas.x,
alphas.y,
diff --git a/src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.vert b/src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.vert
index 3b1ba712..9be245b8 100644
--- a/src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.vert
+++ b/src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.vert
@@ -9,7 +9,6 @@ out vec2 alphas;
out vec4 normalizedTextureBounds;
uniform mat4 mvp;
-uniform mat4 modelView;
uniform int textureWidth;
uniform int textureHeight;
uniform float fontScale;
@@ -41,7 +40,7 @@ vec2 alphaRange(float scale)
void main()
{
- float scale = fontScale * sqrt(abs(determinant(modelView)));
+ float scale = fontScale * sqrt(abs(determinant(mvp)));
alphas = alphaRange(scale);
vec2 textureSizeMultiplier = vec2(1.0 / float(textureWidth), 1.0 / float(textureHeight));