1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-10 18:51:05 +00:00

Merge remote-tracking branch 'upstream/master' into Visuals-Vol-2

This commit is contained in:
Gefüllte Taubenbrust 2025-01-04 11:19:11 +01:00
commit 78de371f2d
123 changed files with 1506 additions and 1956 deletions

View file

@ -9,6 +9,7 @@ attribute vec2 inTexCoord0;
/* Uniforms */
uniform float uThickness;
uniform mat4 uProjection;
/* Varyings */
@ -17,7 +18,7 @@ varying vec4 vVertexColor;
void main()
{
gl_Position = inVertexPosition;
gl_Position = uProjection * inVertexPosition;
gl_PointSize = uThickness;
vTextureCoord = inTexCoord0;
vVertexColor = inVertexColor.bgra;

View file

@ -23,7 +23,12 @@ void main(void)
vec2 uv = varTexCoord.st;
vec3 color = texture2D(rendered, uv).rgb;
// translate to linear colorspace (approximate)
#ifdef GL_ES
// clamp color to [0,1] range in lieu of centroids
color = pow(clamp(color, 0.0, 1.0), vec3(2.2));
#else
color = pow(color, vec3(2.2));
#endif
color *= exposureParams.compensationFactor * bloomStrength;

View file

@ -43,11 +43,14 @@ varying vec3 vPosition;
// cameraOffset + worldPosition (for large coordinates the limits of float
// precision must be considered).
varying vec3 worldPosition;
varying lowp vec4 varColor;
#ifdef GL_ES
varying lowp vec4 varColor;
varying mediump vec2 varTexCoord;
varying float nightRatio;
#else
centroid varying lowp vec4 varColor;
centroid varying vec2 varTexCoord;
centroid varying float nightRatio;
#endif
varying highp vec3 eyeVec;
varying float nightRatio;

View file

@ -14,14 +14,17 @@ varying vec3 vPosition;
// cameraOffset + worldPosition (for large coordinates the limits of float
// precision must be considered).
varying vec3 worldPosition;
varying lowp vec4 varColor;
// The centroid keyword ensures that after interpolation the texture coordinates
// lie within the same bounds when MSAA is en- and disabled.
// This fixes the stripes problem with nearest-neighbor textures and MSAA.
#ifdef GL_ES
varying lowp vec4 varColor;
varying mediump vec2 varTexCoord;
varying float nightRatio;
#else
centroid varying lowp vec4 varColor;
centroid varying vec2 varTexCoord;
centroid varying float nightRatio;
#endif
#ifdef ENABLE_DYNAMIC_SHADOWS
// shadow uniforms
@ -47,6 +50,7 @@ varying highp vec3 eyeVec;
varying float nightRatio;
varying vec3 sunTint;
varying float nightFactor;
// Color of the light emitted by the light sources.
uniform vec3 artificialLight;
const float e = 2.718281828459;