mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
Don't cull text background/Text is emissive
This commit is contained in:
parent
efd805bea7
commit
27a1a55275
2 changed files with 12 additions and 5 deletions
|
@ -56,7 +56,8 @@ void RenderableTextEntityItem::render(RenderArgs* args) {
|
|||
batch.setModelTransform(transformToTopLeft);
|
||||
}
|
||||
|
||||
DependencyManager::get<DeferredLightingEffect>()->renderQuad(batch, minCorner, maxCorner, backgroundColor);
|
||||
DependencyManager::get<DeferredLightingEffect>()->bindSimpleProgram(batch, false, false);
|
||||
DependencyManager::get<GeometryCache>()->renderQuad(batch, minCorner, maxCorner, backgroundColor);
|
||||
|
||||
float scale = _lineHeight / _textRenderer->getFontSize();
|
||||
transformToTopLeft.setScale(scale); // Scale to have the correct line height
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
<@include DeferredBufferWrite.slh@>
|
||||
|
||||
uniform sampler2D Font;
|
||||
uniform bool Outline;
|
||||
uniform vec4 Color;
|
||||
|
@ -44,9 +46,13 @@ void main() {
|
|||
if (a < 0.01) {
|
||||
discard;
|
||||
}
|
||||
|
||||
|
||||
// final color
|
||||
gl_FragData[0] = vec4(Color.rgb, Color.a * a);
|
||||
gl_FragData[1] = vec4(interpolatedNormal.xyz, 0.0) * 0.5 + vec4(0.5, 0.5, 0.5, 1.0);
|
||||
gl_FragData[2] = vec4(0.0);
|
||||
packDeferredFragmentLightmap(
|
||||
normalize(interpolatedNormal.xyz),
|
||||
glowIntensity * texel.a,
|
||||
gl_Color.rgb,
|
||||
gl_FrontMaterial.specular.rgb,
|
||||
gl_FrontMaterial.shininess,
|
||||
Color.rgb);
|
||||
}
|
Loading…
Reference in a new issue