mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-13 03:07:23 +02:00
39 lines
1,004 B
Text
39 lines
1,004 B
Text
<@include gpu/Config.slh@>
|
|
<$VERSION_HEADER$>
|
|
// Generated on <$_SCRIBE_DATE$>
|
|
// overlay3D.slv
|
|
//
|
|
// Created by Sam Gateau on 6/16/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/Inputs.slh@>
|
|
<@include gpu/Color.slh@>
|
|
<@include gpu/Transform.slh@>
|
|
<$declareStandardTransform()$>
|
|
|
|
out vec2 varTexcoord;
|
|
|
|
// interpolated eye position
|
|
out vec4 varEyePosition;
|
|
|
|
// the interpolated normal
|
|
out vec3 varEyeNormal;
|
|
|
|
out vec4 varColor;
|
|
|
|
void main(void) {
|
|
varTexcoord = inTexCoord0.xy;
|
|
|
|
// pass along the color
|
|
varColor = colorToLinearRGBA(inColor);
|
|
|
|
// standard transform
|
|
TransformCamera cam = getTransformCamera();
|
|
TransformObject obj = getTransformObject();
|
|
<$transformModelToEyeAndClipPos(cam, obj, inPosition, varEyePosition, gl_Position)$>
|
|
<$transformModelToEyeDir(cam, obj, inNormal.xyz, varEyeNormal.xyz)$>
|
|
}
|