<@include gpu/Config.slh@> <$VERSION_HEADER$> // Generated on <$_SCRIBE_DATE$> // // paintStroke.frag // fragment shader // // Created by Eric Levin on 8/10/2015 // Copyright 2015 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 in vec3 interpolatedNormal; in vec2 varTexcoord; in vec4 varColor; struct PolyLineUniforms { vec3 color; }; uniform polyLineBuffer { PolyLineUniforms polyline; }; void main(void) { vec4 texel = texture(originalTexture, varTexcoord); int frontCondition = 1 -int(gl_FrontFacing) * 2; vec3 color = varColor.rgb; packDeferredFragmentTranslucent( interpolatedNormal * frontCondition, texel.a, polyline.color * texel.rgb, vec3(0.01, 0.01, 0.01), 10.0); }