Starting investigating the text rendering bug

This commit is contained in:
samcake 2016-03-04 18:24:36 -08:00
parent 30bcb04a2f
commit 3278b76eef

View file

@ -15,6 +15,7 @@
uniform sampler2D Font;
uniform bool Outline;
uniform vec4 Color;
uniform vec4 backgroundColor = vec4(1.0, 0.0, 0.0, 1.0);
// the interpolated normal
in vec3 _normal;
@ -30,6 +31,8 @@ const float smoothing = 256.0;
const float interiorCutoff = 0.8;
const float outlineExpansion = 0.2;
void main() {
// retrieve signed distance
float sdf = texture(Font, _texCoord0).g;
@ -60,8 +63,8 @@ void main() {
*/
packDeferredFragmentLightmap(
normalize(_normal),
Color.a * a,
Color.rgb,
1.0 // Color.a * a,
mix(Color.rgb, backgroundColor, Color.a * a),
DEFAULT_ROUGHNESS,
DEFAULT_METALLIC,
DEFAULT_SPECULAR,