blob: 42fead87134adea87b1e92ce1372a07187e88db0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
varying highp vec2 sampleCoord;
varying highp vec2 shiftedSampleCoord;
uniform mediump sampler2D _qt_texture;
uniform lowp vec4 color;
uniform lowp vec4 styleColor;
uniform mediump float alphaMin;
uniform mediump float alphaMax;
void main()
{
highp float a = smoothstep(alphaMin, alphaMax, texture2D(_qt_texture, sampleCoord).a);
highp vec4 shifted = styleColor * smoothstep(alphaMin,
alphaMax,
texture2D(_qt_texture, shiftedSampleCoord).a);
gl_FragColor = mix(shifted, color, a);
}
|