<@include gpu/Config.slh@> <$VERSION_HEADER$> // <$_SCRIBE_FILENAME$> // Generated on <$_SCRIBE_DATE$> // // 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 // <@if not HIFI_USE_FORWARD@> <@include DeferredBufferWrite.slh@> <@else@> layout(location=0) out vec4 _fragColor0; <@endif@> <@include paintStroke.slh@> <$declarePolyLineBuffers()$> LAYOUT(binding=0) uniform sampler2D _texture; <@if not HIFI_USE_FORWARD@> layout(location=0) in vec3 _normalWS; <@endif@> layout(location=1) in vec2 _texCoord; layout(location=2) in vec4 _color; layout(location=3) in float _distanceFromCenter; void main(void) { vec4 texel = texture(_texture, _texCoord); texel *= _color; texel.a *= mix(1.0, pow(1.0 - min(1.0, abs(_distanceFromCenter)), 10.0), _polylineData.faceCameraGlow.y); <@if not HIFI_USE_FORWARD@> packDeferredFragmentTranslucent((2.0 * float(gl_FrontFacing) - 1.0) * _normalWS, texel.a, texel.rgb, DEFAULT_ROUGHNESS); <@else@> _fragColor0 = texel; <@endif@> }