overte-HifiExperiments/libraries/render-utils/src/simple_textured.slf
2015-07-23 14:56:52 -07:00

31 lines
No EOL
787 B
Text

<@include gpu/Config.slh@>
<$VERSION_HEADER$>
// Generated on <$_SCRIBE_DATE$>
//
// simple.frag
// fragment shader
//
// Created by Clément Brisset on 5/29/15.
// Copyright 2014 High Fidelity, Inc.
//
// 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@>
// the diffuse texture
uniform sampler2D originalTexture;
// the interpolated normal
varying vec4 interpolatedNormal;
void main(void) {
vec4 texel = texture2D(originalTexture, gl_TexCoord[0].st);
packDeferredFragment(
normalize(interpolatedNormal.xyz),
glowIntensity * texel.a,
gl_Color.rgb * texel.rgb,
DEFAULT_SPECULAR, DEFAULT_SHININESS);
}