mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-20 09:20:23 +02:00
26 lines
642 B
Text
26 lines
642 B
Text
<@include gpu/Config.slh@>
|
|
<$VERSION_HEADER$>
|
|
// Generated on <$_SCRIBE_DATE$>
|
|
//
|
|
// stencil_drawMask.frag
|
|
// fragment shader
|
|
//
|
|
// Created by Sam Gateau on 5/31/17.
|
|
// Copyright 2017 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
|
|
//
|
|
|
|
layout(location=0) in vec2 varTexCoord0;
|
|
|
|
float aspectRatio = 0.95;
|
|
|
|
void main(void) {
|
|
vec2 pos = varTexCoord0 * 2.0 - vec2(1.0);
|
|
pos.x = aspectRatio * (pos.x * mix(-2.0, 2.0, float(pos.x > 0.0)) - 1.0);
|
|
|
|
if (1.0 - dot(pos.xy, pos.xy) > 0.0) {
|
|
discard;
|
|
}
|
|
}
|