overte/libraries/render-utils/src/standardDrawTextureNoBlend.slf
2018-10-23 10:40:12 -07:00

30 lines
850 B
Text

<@include gpu/Config.slh@>
<$VERSION_HEADER$>
// Generated on <$_SCRIBE_DATE$>
// standardDrawTexture.frag
// fragment shader
//
// Created by Sam Gateau on 6/10/15.
// 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 gpu/ShaderConstants.h@>
// the texture
LAYOUT(binding=0) uniform sampler2D colorMap;
layout(location=GPU_ATTR_POSITION) in vec3 varPosition;
layout(location=GPU_ATTR_NORMAL) in vec3 varNormal;
layout(location=GPU_ATTR_TEXCOORD0) in vec2 varTexCoord0;
layout(location=GPU_ATTR_COLOR) in vec4 varColor;
layout(location=0) out vec4 outFragColor;
void main(void) {
vec4 color = texture(colorMap, varTexCoord0);
outFragColor = color * varColor;
outFragColor.a = 1.0;
}