mirror of
https://github.com/JulianGro/overte.git
synced 2025-06-02 04:41:49 +02:00
36 lines
952 B
Text
36 lines
952 B
Text
<@include gpu/Config.slh@>
|
|
<$VERSION_HEADER$>
|
|
// Generated on <$_SCRIBE_DATE$>
|
|
// overlay3D.slv
|
|
// vertex shader
|
|
//
|
|
// 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 vec3 _color;
|
|
out float _alpha;
|
|
out vec2 _texCoord0;
|
|
out vec4 _position;
|
|
out vec3 _normal;
|
|
|
|
void main(void) {
|
|
_color = colorToLinearRGB(inColor.xyz);
|
|
_alpha = inColor.w;
|
|
|
|
_texCoord0 = inTexCoord0.st;
|
|
|
|
// standard transform
|
|
TransformCamera cam = getTransformCamera();
|
|
TransformObject obj = getTransformObject();
|
|
<$transformModelToEyeAndClipPos(cam, obj, inPosition, _position, gl_Position)$>
|
|
<$transformModelToWorldDir(cam, obj, inNormal.xyz, _normal)$>
|
|
}
|