mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Fix compile error in text shader
This commit is contained in:
parent
27a1a55275
commit
d02c69111b
2 changed files with 7 additions and 11 deletions
|
@ -177,12 +177,14 @@ void RenderableWebEntityItem::render(RenderArgs* args) {
|
||||||
Q_ASSERT(args->_batch);
|
Q_ASSERT(args->_batch);
|
||||||
gpu::Batch& batch = *args->_batch;
|
gpu::Batch& batch = *args->_batch;
|
||||||
batch.setModelTransform(getTransformToCenter());
|
batch.setModelTransform(getTransformToCenter());
|
||||||
|
bool textured = false, culled = false, emissive = false;
|
||||||
if (_texture) {
|
if (_texture) {
|
||||||
batch._glActiveTexture(GL_TEXTURE0);
|
batch._glActiveTexture(GL_TEXTURE0);
|
||||||
batch._glBindTexture(GL_TEXTURE_2D, _texture);
|
batch._glBindTexture(GL_TEXTURE_2D, _texture);
|
||||||
|
textured = emissive = true;
|
||||||
}
|
}
|
||||||
static const bool textured = true, culled = false, emmissive = true;
|
|
||||||
DependencyManager::get<DeferredLightingEffect>()->bindSimpleProgram(batch, textured, culled, emmissive);
|
DependencyManager::get<DeferredLightingEffect>()->bindSimpleProgram(batch, textured, culled, emissive);
|
||||||
DependencyManager::get<GeometryCache>()->renderQuad(batch, topLeft, bottomRight, texMin, texMax, glm::vec4(1.0f));
|
DependencyManager::get<GeometryCache>()->renderQuad(batch, topLeft, bottomRight, texMin, texMax, glm::vec4(1.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
// 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;
|
||||||
|
@ -48,11 +46,7 @@ void main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// final color
|
// final color
|
||||||
packDeferredFragmentLightmap(
|
gl_FragData[0] = vec4(Color.rgb, Color.a * a);
|
||||||
normalize(interpolatedNormal.xyz),
|
gl_FragData[1] = vec4(normalize(interpolatedNormal.xyz), 0.0) * 0.5 + vec4(0.5, 0.5, 0.5, 0.5);
|
||||||
glowIntensity * texel.a,
|
gl_FragData[2] = vec4(Color.rgb, gl_FrontMaterial.shininess / 128.0);
|
||||||
gl_Color.rgb,
|
|
||||||
gl_FrontMaterial.specular.rgb,
|
|
||||||
gl_FrontMaterial.shininess,
|
|
||||||
Color.rgb);
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue