Fix compile error in text shader

This commit is contained in:
Atlante45 2015-06-26 16:55:48 -07:00
parent 27a1a55275
commit d02c69111b
2 changed files with 7 additions and 11 deletions

View file

@ -177,12 +177,14 @@ void RenderableWebEntityItem::render(RenderArgs* args) {
Q_ASSERT(args->_batch);
gpu::Batch& batch = *args->_batch;
batch.setModelTransform(getTransformToCenter());
bool textured = false, culled = false, emissive = false;
if (_texture) {
batch._glActiveTexture(GL_TEXTURE0);
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));
}

View file

@ -10,8 +10,6 @@
// 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;
@ -48,11 +46,7 @@ void main() {
}
// final color
packDeferredFragmentLightmap(
normalize(interpolatedNormal.xyz),
glowIntensity * texel.a,
gl_Color.rgb,
gl_FrontMaterial.specular.rgb,
gl_FrontMaterial.shininess,
Color.rgb);
gl_FragData[0] = vec4(Color.rgb, Color.a * a);
gl_FragData[1] = vec4(normalize(interpolatedNormal.xyz), 0.0) * 0.5 + vec4(0.5, 0.5, 0.5, 0.5);
gl_FragData[2] = vec4(Color.rgb, gl_FrontMaterial.shininess / 128.0);
}