mirror of
https://github.com/overte-org/overte.git
synced 2025-06-22 00:40:07 +02:00
43 lines
No EOL
1.1 KiB
Text
43 lines
No EOL
1.1 KiB
Text
<@include gpu/Config.slh@>
|
|
<$VERSION_HEADER$>
|
|
// Generated on <$_SCRIBE_DATE$>
|
|
// overlay3D-model_transparent_unlit.slf
|
|
// fragment shader
|
|
//
|
|
// Created by Sam Gateau on 2/28/2017.
|
|
// 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 LightingModel.slh@>
|
|
<@include graphics/Material.slh@>
|
|
|
|
<@include MaterialTextures.slh@>
|
|
<$declareMaterialTextures(ALBEDO)$>
|
|
|
|
in vec2 _texCoord0;
|
|
in vec3 _normal;
|
|
in vec3 _color;
|
|
in float _alpha;
|
|
|
|
out vec4 _fragColor;
|
|
|
|
void main(void) {
|
|
|
|
Material mat = getMaterial();
|
|
int matKey = getMaterialKey(mat);
|
|
<$fetchMaterialTexturesCoord0(matKey, _texCoord0, albedoTex)$>
|
|
|
|
float opacity = 1.0;
|
|
<$evalMaterialOpacity(albedoTex.a, opacity, matKey, opacity)$>;
|
|
|
|
vec3 albedo = getMaterialAlbedo(mat);
|
|
<$evalMaterialAlbedo(albedoTex, albedo, matKey, albedo)$>;
|
|
albedo *= _color;
|
|
|
|
vec4 color = vec4(albedo * isUnlitEnabled(), opacity);
|
|
|
|
_fragColor = vec4(pow(color.xyz, vec3(1.0 / 2.2)), color.w);
|
|
} |