mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 03:53:10 +02:00
40 lines
978 B
Text
40 lines
978 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/Transform.slh@>
|
|
|
|
<$declareStandardTransform()$>
|
|
|
|
attribute vec2 attribTexcoord;
|
|
|
|
varying vec2 varTexcoord;
|
|
|
|
// interpolated eye position
|
|
varying vec4 varEyePosition;
|
|
|
|
// the interpolated normal
|
|
varying vec3 varEyeNormal;
|
|
|
|
varying vec4 varColor;
|
|
|
|
void main(void) {
|
|
varTexcoord = attribTexcoord;
|
|
|
|
// pass along the color
|
|
varColor = gl_Color;
|
|
|
|
// standard transform
|
|
TransformCamera cam = getTransformCamera();
|
|
TransformObject obj = getTransformObject();
|
|
<$transformModelToEyeAndClipPos(cam, obj, gl_Vertex, varEyePosition, gl_Position)$>
|
|
<$transformModelToEyeDir(cam, obj, gl_Normal, varEyeNormal.xyz)$>
|
|
}
|