mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 22:28:48 +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);
|
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();
|
float scale = _lineHeight / _textRenderer->getFontSize();
|
||||||
transformToTopLeft.setScale(scale); // Scale to have the correct line height
|
transformToTopLeft.setScale(scale); // Scale to have the correct line height
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
|
||||||
|
<@include DeferredBufferWrite.slh@>
|
||||||
|
|
||||||
uniform sampler2D Font;
|
uniform sampler2D Font;
|
||||||
uniform bool Outline;
|
uniform bool Outline;
|
||||||
uniform vec4 Color;
|
uniform vec4 Color;
|
||||||
|
@ -44,9 +46,13 @@ void main() {
|
||||||
if (a < 0.01) {
|
if (a < 0.01) {
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|
||||||
// final color
|
// final color
|
||||||
gl_FragData[0] = vec4(Color.rgb, Color.a * a);
|
packDeferredFragmentLightmap(
|
||||||
gl_FragData[1] = vec4(interpolatedNormal.xyz, 0.0) * 0.5 + vec4(0.5, 0.5, 0.5, 1.0);
|
normalize(interpolatedNormal.xyz),
|
||||||
gl_FragData[2] = vec4(0.0);
|
glowIntensity * texel.a,
|
||||||
|
gl_Color.rgb,
|
||||||
|
gl_FrontMaterial.specular.rgb,
|
||||||
|
gl_FrontMaterial.shininess,
|
||||||
|
Color.rgb);
|
||||||
}
|
}
|
Loading…
Reference in a new issue