mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-06-19 09:59:33 +02:00
Applied patches (#103)
This commit is contained in:
parent
510b51eb3d
commit
e9331f9f34
3 changed files with 4 additions and 4 deletions
|
@ -1043,7 +1043,7 @@ void Avatar::renderDisplayName(gpu::Batch& batch, const ViewFrustum& view, const
|
||||||
batch.setModelTransform(textTransform);
|
batch.setModelTransform(textTransform);
|
||||||
{
|
{
|
||||||
PROFILE_RANGE_BATCH(batch, __FUNCTION__":renderText");
|
PROFILE_RANGE_BATCH(batch, __FUNCTION__":renderText");
|
||||||
displayNameRenderer->draw(batch, { nameUTF8.data(), textColor, { text_x, -text_y }, glm::vec2(10.0f), TextAlignment::CENTER, forward });
|
displayNameRenderer->draw(batch, { nameUTF8.data(), textColor, { text_x, -text_y }, glm::vec2(-1.0f), TextAlignment::LEFT, forward });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,8 +95,8 @@ vec4 evalSDFColor(vec2 texCoord, vec4 glyphBounds) {
|
||||||
|
|
||||||
vec4 evalSDFSuperSampled(vec2 texCoord, vec2 positionMS, vec4 glyphBounds) {
|
vec4 evalSDFSuperSampled(vec2 texCoord, vec2 positionMS, vec4 glyphBounds) {
|
||||||
// Clip to edges. Note: We don't need to check the top edge.
|
// Clip to edges. Note: We don't need to check the top edge.
|
||||||
if (positionMS.x < params.bounds.x || positionMS.x > (params.bounds.x + params.bounds.z) ||
|
if ((params.bounds.z > 0.0 && (positionMS.x < params.bounds.x || positionMS.x > (params.bounds.x + params.bounds.z))) ||
|
||||||
positionMS.y < params.bounds.y - params.bounds.w) {
|
(params.bounds.w > 0.0 && (positionMS.y < params.bounds.y - params.bounds.w))) {
|
||||||
return vec4(0.0);
|
return vec4(0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,7 @@ void Font::buildVertices(Font::DrawInfo& drawInfo, const QString& str, const glm
|
||||||
|
|
||||||
// Draw the token
|
// Draw the token
|
||||||
for (const QChar& c : token) {
|
for (const QChar& c : token) {
|
||||||
if (advance.x > rightEdge) {
|
if (bounds.x != -1 && advance.x > rightEdge) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const Glyph& glyph = _glyphs[c];
|
const Glyph& glyph = _glyphs[c];
|
||||||
|
|
Loading…
Reference in a new issue