code review changes and fixes
This commit is contained in:
@@ -8,8 +8,9 @@ layout(set = 2, binding = 0) uniform sampler2D texSampler;
|
||||
|
||||
layout(set = 3, binding = 0) uniform TextConfig
|
||||
{
|
||||
vec3 textColor;
|
||||
vec3 borderColor;
|
||||
vec4 textColor;
|
||||
vec4 borderColor;
|
||||
vec4 backgroundColor;
|
||||
float threshold;
|
||||
float borderSize;
|
||||
float smoothing;
|
||||
@@ -24,10 +25,15 @@ void main()
|
||||
{
|
||||
float border = smoothstep(textConfig.threshold + textConfig.borderSize - textConfig.smoothing,
|
||||
textConfig.threshold + textConfig.borderSize + textConfig.smoothing, distance);
|
||||
outColor = vec4(mix(textConfig.borderColor, textConfig.textColor, border), 1) * alpha;
|
||||
outColor = mix(textConfig.borderColor, textConfig.textColor, border) * alpha;
|
||||
}
|
||||
else
|
||||
{
|
||||
outColor = vec4(textConfig.textColor, 1) * alpha;
|
||||
outColor = vec4(textConfig.textColor) * alpha;
|
||||
}
|
||||
|
||||
if (textConfig.backgroundColor.a != 0)
|
||||
{
|
||||
outColor = mix(textConfig.backgroundColor, outColor, alpha);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user