mirror of
https://github.com/overte-org/overte.git
synced 2025-06-18 22:01:52 +02:00
30 lines
850 B
Text
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;
|
|
}
|