diff --git a/data/ofxMsdfgen/shaders/mix/ES3/shader.frag b/data/ofxMsdfgen/shaders/mix/ES3/shader.frag index 46a83d6..eb8779e 100644 --- a/data/ofxMsdfgen/shaders/mix/ES3/shader.frag +++ b/data/ofxMsdfgen/shaders/mix/ES3/shader.frag @@ -80,6 +80,7 @@ void main() float d = smoothstep(0.2, 0.8, z + 0.2 * (screenPos.x + screenPos.y)); d = min(d, fade); outputColor = vec4(mix(fgColor.rgb, backgroundColor.rgb, d),1.0); + //outputColor = vec4(mix(1.0 - msdf_rgb_a.rgb, backgroundColor.rgb, d),1.0); //outputColor = vec4(opacity, 1.0-opacity, 0.0, 1.0); //outputColor = vec4(1.0-msdf_rgb_a.rgb, 1.0); diff --git a/data/ofxMsdfgen/shaders/mix/ES3/shader.vert b/data/ofxMsdfgen/shaders/mix/ES3/shader.vert index 99941ca..ee03ae2 100644 --- a/data/ofxMsdfgen/shaders/mix/ES3/shader.vert +++ b/data/ofxMsdfgen/shaders/mix/ES3/shader.vert @@ -8,6 +8,7 @@ layout (location = 1) in vec2 vertexUV_a; layout (location = 2) in vec2 vertexUV_b; layout (location = 3) in vec4 vertexColor; layout (location = 4) in float vertexMix; +layout (location = 5) in mat4 globalTransform; out vec2 uv_a; out vec2 uv_b; @@ -20,5 +21,5 @@ void main() uv_b = vertexUV_b; fontColor = vertexColor; msdf_mix = vertexMix; - gl_Position = modelViewProjectionMatrix * vertexPosition; + gl_Position = modelViewProjectionMatrix * globalTransform * vertexPosition; }