Merge branch 'master' of github.com:supertuxkart/stk-code

This commit is contained in:
hiker
2015-01-13 08:13:18 +11:00
5 changed files with 6 additions and 5 deletions

Binary file not shown.

View File

@@ -38,7 +38,7 @@ void main(void)
float r = radius / FragPos.z;
float phi = 3. * (x ^ y) + x * y;
float bl = 0.0;
float m = log2(r) + 6 + log2(invSamples);
float m = max(log2(r) + 6 + log2(invSamples), 0.);
float theta = 2. * 3.14 * tau * .5 * invSamples + phi;
vec2 rotations = vec2(cos(theta), sin(theta)) * screen;
@@ -62,5 +62,5 @@ void main(void)
bl += max(0, dot(vi, norm) - FragPos.z * beta) / (dot(vi, vi) + epsilon);
}
AO = max(pow(1.0 - 2. * sigma * bl * invSamples, k), 0.);
}
AO = max(pow(1.0 - min(2. * sigma * bl * invSamples, 0.99), k), 0.);
}

View File

@@ -9,6 +9,6 @@ vec3 getCIEYxy(vec3 rgbColor)
vec3(.1805, .0722, .9505)));
vec3 xYz = RGB2XYZ * rgbColor;
float tmp = xYz.x + xYz.y + xYz.z;
float tmp = max(xYz.x + xYz.y + xYz.z, 0.1);
return vec3(xYz.y, xYz.xy / tmp);
}

View File

@@ -3,7 +3,7 @@
vec3 getRGBFromCIEXxy(vec3 YxyColor)
{
float Yovery = YxyColor.x / YxyColor.z;
float Yovery = YxyColor.x / max(YxyColor.z, 0.1);
vec3 XYZ = vec3(YxyColor.y * Yovery, YxyColor.x, (1. - YxyColor.y - YxyColor.z) * Yovery);
mat3 XYZ2RGB = transpose(mat3(

View File

@@ -65,6 +65,7 @@ TrackObject::TrackObject(const core::vector3df& xyz, const core::vector3df& hpr,
m_physical_object = NULL;
m_interaction = interaction;
m_presentation = presentation;
m_soccer_ball = false;
if (m_interaction != "ghost" && m_interaction != "none" &&
physics_settings )