mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Fix link problem with shaders that use transparency and normal maps
This commit is contained in:
parent
f98b6c3a28
commit
aad2aaa764
3 changed files with 7 additions and 1 deletions
|
@ -26,10 +26,12 @@ out vec2 _texCoord0;
|
||||||
out vec3 _normal;
|
out vec3 _normal;
|
||||||
out vec3 _tangent;
|
out vec3 _tangent;
|
||||||
out vec3 _color;
|
out vec3 _color;
|
||||||
|
out float _alpha;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
// pass along the color
|
// pass along the color
|
||||||
_color = colorToLinearRGB(inColor.xyz);
|
_color = colorToLinearRGB(inColor.rgb);
|
||||||
|
_alpha = inColor.a;
|
||||||
|
|
||||||
// and the texture coordinates
|
// and the texture coordinates
|
||||||
_texCoord0 = (texcoordMatrices[0] * vec4(inTexCoord0.xy, 0.0, 1.0)).st;
|
_texCoord0 = (texcoordMatrices[0] * vec4(inTexCoord0.xy, 0.0, 1.0)).st;
|
||||||
|
|
|
@ -25,6 +25,7 @@ out vec4 _position;
|
||||||
out vec2 _texCoord0;
|
out vec2 _texCoord0;
|
||||||
out vec3 _normal;
|
out vec3 _normal;
|
||||||
out vec3 _color;
|
out vec3 _color;
|
||||||
|
out float _alpha;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
||||||
|
@ -34,6 +35,7 @@ void main(void) {
|
||||||
|
|
||||||
// pass along the color
|
// pass along the color
|
||||||
_color = colorToLinearRGB(inColor.rgb);
|
_color = colorToLinearRGB(inColor.rgb);
|
||||||
|
_alpha = inColor.a;
|
||||||
|
|
||||||
// and the texture coordinates
|
// and the texture coordinates
|
||||||
_texCoord0 = (texcoordMatrices[0] * vec4(inTexCoord0.st, 0.0, 1.0)).st;
|
_texCoord0 = (texcoordMatrices[0] * vec4(inTexCoord0.st, 0.0, 1.0)).st;
|
||||||
|
|
|
@ -26,6 +26,7 @@ out vec2 _texCoord0;
|
||||||
out vec3 _normal;
|
out vec3 _normal;
|
||||||
out vec3 _tangent;
|
out vec3 _tangent;
|
||||||
out vec3 _color;
|
out vec3 _color;
|
||||||
|
out float _alpha;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
||||||
|
@ -36,6 +37,7 @@ void main(void) {
|
||||||
|
|
||||||
// pass along the color
|
// pass along the color
|
||||||
_color = colorToLinearRGB(inColor.rgb);
|
_color = colorToLinearRGB(inColor.rgb);
|
||||||
|
_alpha = inColor.a;
|
||||||
|
|
||||||
// and the texture coordinates
|
// and the texture coordinates
|
||||||
_texCoord0 = (texcoordMatrices[0] * vec4(inTexCoord0.st, 0.0, 1.0)).st;
|
_texCoord0 = (texcoordMatrices[0] * vec4(inTexCoord0.st, 0.0, 1.0)).st;
|
||||||
|
|
Loading…
Reference in a new issue