diff --git a/libraries/gpu/src/gpu/DrawTextureOpaque.slf b/libraries/gpu/src/gpu/DrawTextureOpaque.slf index d98daa1c9a..b3227325bf 100755 --- a/libraries/gpu/src/gpu/DrawTextureOpaque.slf +++ b/libraries/gpu/src/gpu/DrawTextureOpaque.slf @@ -18,7 +18,7 @@ layout(binding=0) uniform sampler2D colorMap; -layout(location=GPU_ATTR_TEXCOORD0) in vec2 varTexCoord0; +layout(location=0) in vec2 varTexCoord0; layout(location=0) out vec4 outFragColor; diff --git a/libraries/render-utils/src/standardDrawTextureNoBlend.slf b/libraries/render-utils/src/standardDrawTextureNoBlend.slf new file mode 100644 index 0000000000..95138d123f --- /dev/null +++ b/libraries/render-utils/src/standardDrawTextureNoBlend.slf @@ -0,0 +1,30 @@ +<@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; +} diff --git a/libraries/shaders/CMakeLists.txt b/libraries/shaders/CMakeLists.txt index 1c4824ac02..06998e3ef5 100644 --- a/libraries/shaders/CMakeLists.txt +++ b/libraries/shaders/CMakeLists.txt @@ -80,7 +80,7 @@ AUTOSCRIBE_PROGRAM(NAME ssao_debugOcclusion VERTEX gpu::vertex::DrawViewportQuad AUTOSCRIBE_PROGRAM(NAME stencil_drawMask VERTEX gpu::vertex::DrawUnitQuadTexcoord) AUTOSCRIBE_PROGRAM(NAME standardDrawTexture VERTEX standardTransformPNTC) -AUTOSCRIBE_PROGRAM(NAME standardDrawTextureNoBlend VERTEX standardTransformPNTC FRAGMENT gpu::fragment::DrawTextureOpaque) +AUTOSCRIBE_PROGRAM(NAME standardDrawTextureNoBlend VERTEX standardTransformPNTC) AUTOSCRIBE_PROGRAM(NAME subsurfaceScattering_makeProfile VERTEX gpu::vertex::DrawUnitQuadTexcoord) AUTOSCRIBE_PROGRAM(NAME subsurfaceScattering_makeLUT VERTEX gpu::vertex::DrawUnitQuadTexcoord)