Merged master. It broke the bloom filter.

This commit is contained in:
Jonathas Costa
2019-06-19 20:47:37 -04:00
1393 changed files with 16974 additions and 11009 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
+3 -5
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -36,15 +36,13 @@ uniform float Alpha;
Fragment getFragment() {
Fragment frag;
// power scale coordinates for depth. w value is set to 1.0.
float depth = (1.0 + log(abs(OcclusionDepth) + 1/pow(k, 1.0))/log(k)) / 27.0;
frag.color = texture(texture1, vs_st);
frag.color.a = (frag.color.a != 0.0) ? Alpha : frag.color.a;
frag.color.a = Alpha * frag.color.a;
if (frag.color.a == 0.0) {
discard;
}
frag.depth = denormalizeFloat(depth);
frag.depth = vs_position.z;
return frag;
}
+3 -3
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -24,7 +24,7 @@
#version __CONTEXT__
layout(location = 0) in vec2 in_position;
layout(location = 0) in vec3 in_position;
layout(location = 1) in vec2 in_st;
out vec2 vs_st;
@@ -36,6 +36,6 @@ uniform mat4 ViewProjectionMatrix;
void main() {
vs_st = in_st;
vs_position = ViewProjectionMatrix * ModelTransform * vec4(in_position, 0.0, 1.0);
vs_position = ViewProjectionMatrix * ModelTransform * vec4(in_position, 1.0);
gl_Position = vec4(vs_position);
}
+16 -17
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -25,31 +25,30 @@
#include "fragment.glsl"
#include "PowerScaling/powerScaling_fs.hglsl"
in vec2 vs_st;
in vec4 vs_position;
in vec4 vs_gPosition;
in vec2 vs_textureCoords;
in vec3 vs_normal;
uniform float time;
uniform sampler2D texture1;
uniform sampler2D colorTexture;
uniform float opacity;
uniform bool mirrorTexture;
Fragment getFragment() {
vec4 position = vs_position;
vec2 texCoord = vs_st;
// Why is this here? ---abock
texCoord.s = 1 - texCoord.s;
texCoord.t = 1 - texCoord.y;
vec2 texCoord = vs_textureCoords;
Fragment frag;
frag.color = texture(texture1, texCoord) * vec4(1.0, 1.0, 1.0, opacity);
frag.depth = pscDepth(position);
if (mirrorTexture) {
texCoord.x = 1.0 - texCoord.x;
}
frag.color = texture(colorTexture, texCoord);
frag.color.a *= opacity;
frag.depth = vs_position.w;
// G-Buffer
frag.gPosition = vs_gPosition;
// There is no normal here
// TODO: Add the correct normal (JCC)
frag.gNormal = vec4(0.0, 0.0, 0.0, 1.0);
frag.gPosition = vs_position;
frag.gNormal = vec4(vs_normal, 1.0);
return frag;
}
}
+13 -25
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -24,35 +24,23 @@
#version __CONTEXT__
#include "PowerScaling/powerScaling_vs.hglsl"
layout(location = 0) in vec4 in_position;
layout(location = 1) in vec2 in_st;
layout(location = 1) in vec2 in_textureCoords;
out vec2 vs_st;
uniform mat4 modelViewProjection;
uniform mat3 modelViewRotation;
out vec2 vs_textureCoords;
out vec4 vs_position;
out float s;
out vec4 vs_gPosition;
uniform mat4 ViewProjection;
uniform mat4 ModelTransform;
out vec3 vs_normal;
void main() {
vec4 tmp = in_position;
vs_normal = modelViewRotation * normalize(in_position.xyz);
vs_textureCoords = in_textureCoords;
mat4 mt = mat4(0.0, -1.0, 0.0, 0.0,
1.0, 0.0, 0.0, 0.0,
0.0, 0.0, -1.0, 0.0,
0.0, 0.0, 0.0, 1.0) * ModelTransform;
vec4 position = pscTransform(tmp, mt);
vs_position = tmp;
vs_st = in_st;
vs_gPosition = position;
position = ViewProjection * position;
gl_Position = z_normalization(position);
vec4 position = modelViewProjection * vec4(in_position.xyz, 1.0);
vs_position = position;
// Set z to 0 to disable near/far-plane clipping
gl_Position = vec4(position.xy, 0.0, position.w);
}