mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
30 lines
786 B
Text
30 lines
786 B
Text
<@include gpu/Config.slh@>
|
|
<$VERSION_HEADER$>
|
|
// Generated on <$_SCRIBE_DATE$>
|
|
// polyvox.vert
|
|
// vertex shader
|
|
//
|
|
// 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/Transform.slh@>
|
|
|
|
<$declareStandardTransform()$>
|
|
|
|
out vec4 _position;
|
|
out vec4 _worldPosition;
|
|
out vec3 _normal;
|
|
|
|
void main(void) {
|
|
// standard transform
|
|
TransformCamera cam = getTransformCamera();
|
|
TransformObject obj = getTransformObject();
|
|
<$transformModelToEyeAndClipPos(cam, obj, inPosition, _position, gl_Position)$>
|
|
<$transformModelToEyeDir(cam, obj, inNormal.xyz, _normal)$>
|
|
_worldPosition = inPosition;
|
|
}
|