mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
34 lines
693 B
Text
34 lines
693 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
|
|
//
|
|
|
|
|
|
<@include gpu/Transform.slh@>
|
|
|
|
<$declareStandardTransform()$>
|
|
|
|
in vec2 varTexCoord0;
|
|
out vec4 outFragColor;
|
|
|
|
uniform sampler2D depthTexture;
|
|
|
|
void main(void) {
|
|
|
|
float depth = texture(depthTexture, varTexCoord0).r;
|
|
|
|
if (depth >= 0.9) {
|
|
outFragColor = vec4(1.0, 0.0, 0.0, 1.0);
|
|
} else {
|
|
discard;
|
|
}
|
|
}
|