mirror of
https://github.com/JulianGro/overte.git
synced 2025-07-14 00:06:42 +02:00
54 lines
1.6 KiB
Text
54 lines
1.6 KiB
Text
<@include gpu/Config.slh@>
|
|
<$VERSION_HEADER$>
|
|
// Generated on <$_SCRIBE_DATE$>
|
|
//
|
|
// skin_model_fade.vert
|
|
// vertex shader
|
|
//
|
|
// Created by Olivier Prat on 06/045/17.
|
|
// Copyright 2017 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()$>
|
|
|
|
<@include Skinning.slh@>
|
|
<$declareUseDualQuaternionSkinning()$>
|
|
|
|
<@include MaterialTextures.slh@>
|
|
<$declareMaterialTexMapArrayBuffer()$>
|
|
|
|
out vec4 _positionES;
|
|
out vec2 _texCoord0;
|
|
out vec2 _texCoord1;
|
|
out vec3 _normalWS;
|
|
out vec3 _color;
|
|
out float _alpha;
|
|
out vec4 _positionWS;
|
|
|
|
void main(void) {
|
|
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
|
vec3 interpolatedNormal = vec3(0.0, 0.0, 0.0);
|
|
|
|
skinPositionNormal(inSkinClusterIndex, inSkinClusterWeight, inPosition, inNormal.xyz, position, interpolatedNormal);
|
|
|
|
// pass along the color
|
|
_color = color_sRGBToLinear(inColor.rgb);
|
|
_alpha = inColor.a;
|
|
|
|
TexMapArray texMapArray = getTexMapArray();
|
|
<$evalTexMapArrayTexcoord0(texMapArray, inTexCoord0, _texCoord0)$>
|
|
<$evalTexMapArrayTexcoord1(texMapArray, inTexCoord0, _texCoord1)$>
|
|
|
|
// standard transform
|
|
TransformCamera cam = getTransformCamera();
|
|
TransformObject obj = getTransformObject();
|
|
<$transformModelToEyeAndClipPos(cam, obj, position, _positionES, gl_Position)$>
|
|
<$transformModelToWorldPos(obj, position, _positionWS)$>
|
|
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, _normalWS.xyz)$>
|
|
}
|