Merged master, resolved conflict in CMakeLists.txt
@ -129,9 +129,9 @@ if(UNIX AND USE_XRANDR)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
if(USE_CPP2011)
|
||||
add_definitions("-std=c++0x")
|
||||
endif()
|
||||
# if(USE_CPP2011)
|
||||
add_definitions("-std=gnu++0x")
|
||||
# endif()
|
||||
endif()
|
||||
|
||||
# OpenGL
|
||||
|
Before Width: | Height: | Size: 49 KiB |
@ -1,82 +0,0 @@
|
||||
* plunger model, cake model, bomb model, anchor model
|
||||
created by MiniBjorn (c) 2008
|
||||
released under Creative Commons Attribution-Share Alike 3.0
|
||||
[http://creativecommons.org/licenses/by-sa/3.0/]
|
||||
|
||||
* bubblegum model, nitrotank-big model, nitrotank-small model, giftbox model
|
||||
created by MiniBjorn (c) 2008
|
||||
released under Creative Commons Attribution-Share Alike 3.0
|
||||
[http://creativecommons.org/licenses/by-sa/3.0/]
|
||||
|
||||
* banana.ac
|
||||
created by horace aka thomas oppl (toppl@fh-sbg.ac.at) (c) 2008
|
||||
released under Creative Commons Attribution-Share Alike 3.0
|
||||
[http://creativecommons.org/licenses/by-sa/3.0/]
|
||||
|
||||
* chest*
|
||||
by MiniBjorn (c) 2010
|
||||
released under Creative Commons Attribution-Share Alike 3.0
|
||||
[http://creativecommons.org/licenses/by-sa/3.0/]
|
||||
|
||||
* gplose
|
||||
released under CC-BY-SA 3.0 [http://creativecommons.org/licenses/by-sa/3.0/]
|
||||
oak by Julius Krischan Makowka, released un CC-BY-SA 3.0
|
||||
Tires by Thomas Oppl, released under CC-BY-SA 3.0
|
||||
scene and finishing touches by Marianne Gagnon
|
||||
|
||||
* Hammer.jpg
|
||||
by Marianne Gagnon, released under CC-BY-SA 3.0
|
||||
Incorporates image by Philipp Zinger, released under CCBY 3.0
|
||||
image by Louise Price, released under CC-BY 2.0 (considered a derivate work thus allowing to upgrade the license version),
|
||||
image by Smoth 007, released under CC-BY-SA 2.0 (considered a derivate work thus allowing to upgrade the license version),
|
||||
image by Juangonzalez64 released under the public domain
|
||||
|
||||
* swatter, christmas_hat
|
||||
released under CC-BY-SA 3.0
|
||||
by Funto
|
||||
|
||||
* tire
|
||||
based on work by Thomas Oppl, released under CC-BY-SA 3.0
|
||||
with modifications by Marianne Gagnon
|
||||
|
||||
* tnt-bomb
|
||||
by Fraang, released under CC-BY-SA 3.0
|
||||
|
||||
* village
|
||||
released under CC-BY-SA 3.0 [http://creativecommons.org/licenses/by-sa/3.0/]
|
||||
oak by Julius Krischan Makowka, released un CC-BY-SA 3.0
|
||||
mushrooms by pfunked, with modifications by Marianne Gagnon, released under CC-BY-SA 3.0
|
||||
pinos by Moser Juan José, with minor modifications by Marianne Gagnon, released under CC-BY-SA 3.0
|
||||
scene and finishing touches by Marianne Gagnon
|
||||
|
||||
* shroom_color* textures by Julius Krischan Makowka, released un CC-BY-SA 3.0
|
||||
|
||||
* door.png by Marianne Gagnon, released under CC-BY-SA 3.0, based on a public domain image
|
||||
from BurningWell.
|
||||
|
||||
* zipper_collect
|
||||
by Connor, released as Public Domain
|
||||
|
||||
* rubber_ball and jump-bomb.jpg
|
||||
by Samuncle, released under CC-BY-SA
|
||||
|
||||
* thunderbird model
|
||||
by Funto & Kinsu, released under CC-BY-SA 3.0
|
||||
|
||||
* thunderbird texture, easter egg, bomb texture
|
||||
by Fraag, released under CC-BY-SA 3.0
|
||||
|
||||
* swatter-icon
|
||||
by Totoplus62, released under CC-0
|
||||
|
||||
* balldimpleddark
|
||||
by Hero, released under CC-BY-SA 3.0
|
||||
|
||||
* rubber_ball-icon, plunger icon, easter egg icon, cake icon, bowling ball texture and icon
|
||||
by Totoplus62, released under CC-BY-SA 3.0
|
||||
|
||||
* shield-icon
|
||||
by tuxfan, release under CC-BY-SA 3.0
|
||||
|
||||
|
||||
Others are GPL, by the original (super)TuxKart team
|
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 169 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 592 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 86 KiB |
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<materials>
|
||||
<material name="banana.png"/>
|
||||
<material name="gift-box.png"/>
|
||||
<material name="gift-loop.png" shader="spheremap"/>
|
||||
<material name="gold.png" light="Y" shader="spheremap"/>
|
||||
<material name="silver.png" light="Y" shader="spheremap"/>
|
||||
<material name="bronze.png" light="Y" shader="spheremap"/>
|
||||
|
||||
<material name="stk_mod_nitroBarrel.png" />
|
||||
<material name="stk_mod_nitroBottle.png" />
|
||||
<material name="stk_mod_nitroLogo.png" shader="additive" disable-z-write="Y" />
|
||||
|
||||
<material name="traffic_light_green.jpg" shader="unlit"/>
|
||||
<material name="traffic_light_yellow.jpg" shader="unlit"/>
|
||||
<material name="traffic_light_red.jpg" shader="unlit"/>
|
||||
|
||||
<material name="bubblegum_shield.png" shader="alphablend" disable-z-write="Y"/>
|
||||
<material name="bubblegum_shield_nolok.png" shader="alphablend" disable-z-write="Y"/>
|
||||
<material name="parachute.png" backface-culling="n" ignore="Y"/>
|
||||
<material name="zipper.png" shader="unlit" zipper="Y"/>
|
||||
</materials>
|
||||
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 47 KiB |
@ -1,19 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- model: the model filename to load as referee
|
||||
{first,last}-rescue-frame: Frame numbers for the rescue animation.
|
||||
{first,last}-start-frame: Frame numbers for the start animation.
|
||||
start-offset: XYZ offset relative to kart where to display the start referee
|
||||
scale: Scales the mesh.
|
||||
start-rotation: Rotation of the referee at start
|
||||
colors: Three texture names that are used for ready, set, go. -->
|
||||
|
||||
<referee model="thunderbird.b3d"
|
||||
first-rescue-frame="625"
|
||||
last-rescue-frame="700"
|
||||
first-start-frame="265"
|
||||
last-start-frame="290"
|
||||
start-offset="-1.2 2 2"
|
||||
scale = "0.2 0.2 0.2"
|
||||
start-rotation="0 180 0"
|
||||
colors="traffic_light_red.jpg traffic_light_yellow.jpg traffic_light_green.jpg"
|
||||
/>
|
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 210 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 287 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 7.0 KiB |
@ -42,14 +42,6 @@ void main()
|
||||
// Fade according to distance to cam
|
||||
float fade = 1.0 - smoothstep(1.0, 100.0, camdist);
|
||||
|
||||
// Fade according to distance from the edges
|
||||
const float mindist = 0.1;
|
||||
fade *= smoothstep(0.0, mindist, uv_bis.x) * smoothstep(0.0, mindist, uv_bis.y) *
|
||||
(1.0 - smoothstep(1.0 - mindist, 1.0, uv_bis.x)) *
|
||||
(1.0 - smoothstep(1.0 - mindist, 1.0, uv_bis.y));
|
||||
|
||||
offset *= 50.0 * fade * maxlen;
|
||||
|
||||
vec4 shiftval;
|
||||
shiftval.r = step(offset.x, 0.0) * -offset.x;
|
||||
shiftval.g = step(0.0, offset.x) * offset.x;
|
||||
|
@ -1,7 +1,23 @@
|
||||
uniform vec3 windDir;
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 TransposeInverseModelView;
|
||||
#ifdef UBO_DISABLED
|
||||
uniform mat4 ViewMatrix;
|
||||
uniform mat4 ProjectionMatrix;
|
||||
uniform mat4 InverseViewMatrix;
|
||||
uniform mat4 InverseProjectionMatrix;
|
||||
#else
|
||||
layout (std140) uniform MatrixesData
|
||||
{
|
||||
mat4 ViewMatrix;
|
||||
mat4 ProjectionMatrix;
|
||||
mat4 InverseViewMatrix;
|
||||
mat4 InverseProjectionMatrix;
|
||||
mat4 ShadowViewProjMatrixes[4];
|
||||
vec2 screen;
|
||||
};
|
||||
#endif
|
||||
|
||||
uniform vec3 windDir;
|
||||
uniform mat4 ModelMatrix;
|
||||
uniform mat4 InverseModelMatrix;
|
||||
|
||||
#if __VERSION__ >= 330
|
||||
layout(location = 0) in vec3 Position;
|
||||
@ -20,7 +36,9 @@ out vec2 uv;
|
||||
|
||||
void main()
|
||||
{
|
||||
uv = Texcoord;
|
||||
nor = (TransposeInverseModelView * vec4(Normal, 1.)).xyz;
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(Position + windDir * Color.r, 1.);
|
||||
uv = Texcoord;
|
||||
mat4 ModelViewProjectionMatrix = ProjectionMatrix * ViewMatrix * ModelMatrix;
|
||||
mat4 TransposeInverseModelView = transpose(InverseModelMatrix * InverseViewMatrix);
|
||||
nor = (TransposeInverseModelView * vec4(Normal, 1.)).xyz;
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(Position + windDir * Color.r, 1.);
|
||||
}
|
||||
|
@ -1,8 +1,23 @@
|
||||
#ifdef UBO_DISABLED
|
||||
uniform mat4 ViewMatrix;
|
||||
uniform mat4 ProjectionMatrix;
|
||||
uniform mat4 InverseViewMatrix;
|
||||
uniform mat4 InverseProjectionMatrix;
|
||||
#else
|
||||
layout (std140) uniform MatrixesData
|
||||
{
|
||||
mat4 ViewMatrix;
|
||||
mat4 ProjectionMatrix;
|
||||
mat4 InverseViewMatrix;
|
||||
mat4 InverseProjectionMatrix;
|
||||
mat4 ShadowViewProjMatrixes[4];
|
||||
vec2 screen;
|
||||
};
|
||||
#endif
|
||||
|
||||
uniform sampler2D Albedo;
|
||||
uniform vec3 SunDir;
|
||||
uniform mat4 invproj;
|
||||
uniform sampler2D dtex;
|
||||
uniform vec2 screen;
|
||||
|
||||
in vec3 nor;
|
||||
in vec2 uv;
|
||||
@ -16,7 +31,7 @@ void main(void)
|
||||
float z = texture(dtex, texc).x;
|
||||
|
||||
vec4 xpos = 2.0 * vec4(texc, z, 1.0) - 1.0f;
|
||||
xpos = invproj * xpos;
|
||||
xpos = InverseProjectionMatrix * xpos;
|
||||
xpos /= xpos.w;
|
||||
vec3 eyedir = normalize(xpos.xyz);
|
||||
|
||||
|
49
data/shaders/instanciedgrassshadow.vert
Normal file
@ -0,0 +1,49 @@
|
||||
layout (std140) uniform MatrixesData
|
||||
{
|
||||
mat4 ViewMatrix;
|
||||
mat4 ProjectionMatrix;
|
||||
mat4 InverseViewMatrix;
|
||||
mat4 InverseProjectionMatrix;
|
||||
mat4 ShadowViewProjMatrixes[4];
|
||||
};
|
||||
uniform vec3 windDir;
|
||||
#if __VERSION__ >= 330
|
||||
layout(location = 0) in vec3 Position;
|
||||
layout(location = 2) in vec4 Color;
|
||||
layout(location = 3) in vec2 Texcoord;
|
||||
|
||||
layout(location = 7) in vec3 Origin;
|
||||
layout(location = 8) in vec3 Orientation;
|
||||
layout(location = 9) in vec3 Scale;
|
||||
#else
|
||||
in vec3 Position;
|
||||
in vec2 Texcoord;
|
||||
|
||||
in vec3 Origin;
|
||||
in vec3 Orientation;
|
||||
in vec3 Scale;
|
||||
#endif
|
||||
|
||||
#ifdef VSLayer
|
||||
out vec2 uv;
|
||||
#else
|
||||
out vec2 tc;
|
||||
out int layerId;
|
||||
#endif
|
||||
|
||||
mat4 getWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
|
||||
mat4 getInverseWorldMatrix(vec3 translation, vec3 rotation, vec3 scale);
|
||||
|
||||
void main(void)
|
||||
{
|
||||
mat4 ModelMatrix = getWorldMatrix(Origin, Orientation, Scale);
|
||||
#ifdef VSLayer
|
||||
gl_Layer = gl_InstanceID & 3;
|
||||
gl_Position = ShadowViewProjMatrixes[gl_Layer] * ModelMatrix * vec4(Position + windDir * Color.r, 1.);
|
||||
uv = Texcoord;
|
||||
#else
|
||||
layerId = gl_InstanceID & 3;
|
||||
gl_Position = ShadowViewProjMatrixes[layerId] * ModelMatrix * vec4(Position + windDir * Color.r, 1.);
|
||||
tc = Texcoord;
|
||||
#endif
|
||||
}
|
35
data/shaders/shadow_grass.vert
Normal file
@ -0,0 +1,35 @@
|
||||
layout (std140) uniform MatrixesData
|
||||
{
|
||||
mat4 ViewMatrix;
|
||||
mat4 ProjectionMatrix;
|
||||
mat4 InverseViewMatrix;
|
||||
mat4 InverseProjectionMatrix;
|
||||
mat4 ShadowViewProjMatrixes[4];
|
||||
};
|
||||
|
||||
uniform mat4 ModelMatrix;
|
||||
uniform vec3 windDir;
|
||||
|
||||
layout(location = 0) in vec3 Position;
|
||||
layout(location = 2) in vec4 Color;
|
||||
layout(location = 3) in vec2 Texcoord;
|
||||
|
||||
#ifdef VSLayer
|
||||
out vec2 uv;
|
||||
#else
|
||||
out vec2 tc;
|
||||
out int layerId;
|
||||
#endif
|
||||
|
||||
void main(void)
|
||||
{
|
||||
#ifdef VSLayer
|
||||
gl_Layer = gl_InstanceID & 3;
|
||||
uv = Texcoord;
|
||||
gl_Position = ShadowViewProjMatrixes[gl_Layer] * ModelMatrix * vec4(Position + windDir * Color.r, 1.);
|
||||
#else
|
||||
layerId = gl_InstanceID & 3;
|
||||
tc = Texcoord;
|
||||
gl_Position = ShadowViewProjMatrixes[layerId] * ModelMatrix * vec4(Position + windDir * Color.r, 1.);
|
||||
#endif
|
||||
}
|
@ -41,7 +41,7 @@ void main() {
|
||||
vec4 splatted = splatting.r * detail0 +
|
||||
splatting.g * detail1 +
|
||||
splatting.b * detail2 +
|
||||
(1.0 - splatting.r - splatting.g - splatting.b) * detail3;
|
||||
max(0., (1.0 - splatting.r - splatting.g - splatting.b)) * detail3;
|
||||
|
||||
vec2 tc = gl_FragCoord.xy / screen;
|
||||
vec3 DiffuseComponent = texture(DiffuseMap, tc).xyz;
|
||||
|