overte/libraries/render-utils/src/drawOpaqueStencil.slf
2015-10-01 19:23:32 -07:00

24 lines
545 B
Text

<@include gpu/Config.slh@>
<$VERSION_HEADER$>
// Generated on <$_SCRIBE_DATE$>
//
// drawOpaqueStencil.frag
// fragment shader
//
// Created by Sam Gateau on 9/29/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
//
in vec2 varTexCoord0;
uniform sampler2D depthTexture;
void main(void) {
float depth = texture(depthTexture, varTexCoord0.xy).r;
if (depth >= 1.0) {
discard;
}
}