unitRange vec2
This commit is contained in:
parent
7210d0746a
commit
33b400c5d7
2 changed files with 4 additions and 2 deletions
|
@ -5,7 +5,7 @@ precision highp float;
|
|||
uniform sampler2D msdf;
|
||||
|
||||
uniform vec4 fontColor;
|
||||
uniform float unitRange;
|
||||
uniform vec2 unitRange;
|
||||
|
||||
// this comes from the vertex shader
|
||||
in vec2 texCoordVarying;
|
||||
|
@ -31,5 +31,7 @@ void main()
|
|||
float sd = median(msdf_rgb.r, msdf_rgb.g, msdf_rgb.b);
|
||||
float screenPxDistance = screenPxRange()*(sd - 0.5);
|
||||
float opacity = clamp(screenPxDistance + 0.5, 0.0, 1.0);
|
||||
|
||||
outputColor = mix(bgColor, fgColor, opacity);
|
||||
//outputColor = vec4(opacity, 1.0-opacity, 0.0, 1.0);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ precision highp float;
|
|||
uniform sampler2DRect msdf;
|
||||
|
||||
uniform vec4 fontColor;
|
||||
uniform float unitRange;
|
||||
uniform vec2 unitRange;
|
||||
|
||||
// this comes from the vertex shader
|
||||
in vec2 texCoordVarying;
|
||||
|
|
Loading…
Reference in a new issue