mirror of
https://github.com/JulianGro/overte.git
synced 2025-07-14 00:06:42 +02:00
36 lines
962 B
Text
36 lines
962 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 _positionES;
|
|
out vec3 _normalWS;
|
|
|
|
void main(void) {
|
|
_color = color_sRGBToLinear(inColor.xyz);
|
|
_alpha = inColor.w;
|
|
|
|
_texCoord0 = inTexCoord0.st;
|
|
|
|
// standard transform
|
|
TransformCamera cam = getTransformCamera();
|
|
TransformObject obj = getTransformObject();
|
|
<$transformModelToEyeAndClipPos(cam, obj, inPosition, _positionES, gl_Position)$>
|
|
<$transformModelToWorldDir(cam, obj, inNormal.xyz, _normalWS)$>
|
|
}
|