Merge remote-tracking branch 'upstream/master'
Conflicts: data/shaders/ssao.frag
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
bld/
|
||||
bld*/
|
||||
build/
|
||||
build-32/
|
||||
build-64/
|
||||
@@ -18,6 +18,9 @@ data/textures
|
||||
data/tracks
|
||||
data/.svn
|
||||
|
||||
# Ignore doxygen output
|
||||
src/html
|
||||
|
||||
*.o
|
||||
*.d
|
||||
*.a
|
||||
@@ -35,6 +38,7 @@ data/.svn
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
||||
*.vcxproj.user
|
||||
*~
|
||||
|
||||
packets_log.txt
|
||||
history.dat
|
||||
|
||||
15
README.md
15
README.md
@@ -26,13 +26,16 @@ Hope you enjoy the game.
|
||||
##Compiling SuperTuxKart
|
||||
|
||||
###Windows
|
||||
A project file for Visual Studio 9 (e.g. the free 2008 express
|
||||
edition) is included in the sources in `src/ide/vc9`. A separate
|
||||
dependency package is available on SuperTuxKart's sourceforge
|
||||
page, which includes all necessary libraries, header files,
|
||||
and dlls to compile and run the source code.
|
||||
1. Install VS 2012 or later. The free express versions work fine.
|
||||
2. Download and install a source package - either a released package or from our [git/svn repositories](http://supertuxkart.sourceforge.net/Source_control)
|
||||
3. Download the latest dependency package depdendencies_for_0.8.2.zip from [here](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/Windows/). Unzip it in the root directory, so that the dependencies directory is next to the src and data directory (if you are updating from a previous dependency package, you can delete the .dll files in the root directory, they are not needed anymore).
|
||||
4. Download cmake and install it. Then start cmake-gui and select the STK root directory as 'Where is the source code', and a new directory in the root directory (next to src, data etc) as build directory (for now I assume that this directory is called bld).
|
||||
5. Click on configure. You will be asked to create the directory (yes), then for your VS version. Make sure to select the right version (be aware of the easy to confuse version numbers: VS 2012 = version 11; VS 2013 = version 12). Click on configure, then generate. This will create the directory 'bld', and a VS solution in that directory.
|
||||
6. In Visual Studio open the project file generated in the 'bld' folder
|
||||
7. Right click on the supertuxkart project in the solution explorer, and select "Set as StartUp Project".
|
||||
8. Select Build->Build Solution (or press F7) to compile.
|
||||
|
||||
While compilation with cygwin is not officially supported,
|
||||
Compilation with cygwin is not officially supported, but
|
||||
this has been done (check with the forum for details).
|
||||
|
||||
###Mac OS X
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<achievements>
|
||||
<achievement id="1" type="map" title="Christoffel Columbus" description="Play every official track at least once." >
|
||||
<entry key="farm" goal="1"/>
|
||||
<entry key="scotland" goal="1"/>
|
||||
<entry key="lighthouse" goal="1"/>
|
||||
<entry key="sandtrack" goal="1"/>
|
||||
<entry key="olivermath" goal="1"/>
|
||||
<entry key="subsea" goal="1"/>
|
||||
<entry key="mansion" goal="1"/>
|
||||
<entry key="minigolf" goal="1"/>
|
||||
<entry key="hacienda" goal="1"/>
|
||||
<entry key="jungle" goal="1"/>
|
||||
<achievement id="1" check-type="all-at-least" reset-after-race="no"
|
||||
title="Christoffel Columbus" description="Play every official track at least once." >
|
||||
<farm goal="1"/>
|
||||
<scotland goal="1"/>
|
||||
<lighthouse goal="1"/>
|
||||
<sandtrack goal="1"/>
|
||||
<olivermath goal="1"/>
|
||||
<subsea goal="1"/>
|
||||
<mansion goal="1"/>
|
||||
<minigolf goal="1"/>
|
||||
<hacienda goal="1"/>
|
||||
<jungle goal="1"/>
|
||||
</achievement>
|
||||
<achievement id="2" check-type="all-at-least" reset-after-race="no"
|
||||
title="Strike!" description="Hit 10 karts with a bowling-ball.">
|
||||
<ball goal="10"/>
|
||||
</achievement>
|
||||
<achievement id="3" check-type="one-at-least" reset-after-race="yes"
|
||||
title="Arch Enemy" description="Hit the same kart at least 5 times in one race">
|
||||
<hit goal="5"/>
|
||||
</achievement>
|
||||
<achievement id="2" type="single" goal="10" title="Strike!" description="Hit 10 karts with a bowling-ball." />
|
||||
</achievements>
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,13 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
#version 330
|
||||
uniform mat4 ModelViewMatrix;
|
||||
uniform mat4 ProjectionMatrix;
|
||||
uniform vec3 Position;
|
||||
uniform vec2 Size;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 Corner;
|
||||
in vec2 Texcoord;
|
||||
out vec2 uv;
|
||||
#else
|
||||
attribute vec2 Corner;
|
||||
attribute vec2 Texcoord;
|
||||
varying vec2 uv;
|
||||
#endif
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform float low;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330 compatibility
|
||||
uniform float power;
|
||||
uniform sampler2D tex;
|
||||
|
||||
|
||||
@@ -14,11 +14,18 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#version 330
|
||||
|
||||
uniform sampler2D tex;
|
||||
uniform float transparency;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -17,13 +17,21 @@
|
||||
|
||||
|
||||
// Creates a bubble (wave) effect by distorting the texture depending on time
|
||||
#version 330
|
||||
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform float time;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 Position;
|
||||
in vec2 Texcoord;
|
||||
out vec2 uv;
|
||||
#else
|
||||
attribute vec3 Position;
|
||||
attribute vec2 Texcoord;
|
||||
varying vec2 uv;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,20 +1,32 @@
|
||||
#version 330 compatibility
|
||||
uniform sampler2D tex;
|
||||
uniform sampler2D Albedo;
|
||||
uniform sampler2D DiffuseMap;
|
||||
uniform sampler2D SpecularMap;
|
||||
uniform sampler2D SSAO;
|
||||
uniform vec2 screen;
|
||||
uniform vec3 ambient;
|
||||
uniform sampler2D caustictex;
|
||||
uniform vec2 dir;
|
||||
uniform vec2 dir2;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 tc = gl_TexCoord[0].xy;
|
||||
vec2 tc = gl_FragCoord.xy / screen;
|
||||
vec3 DiffuseComponent = texture(DiffuseMap, tc).xyz;
|
||||
vec3 SpecularComponent = texture(SpecularMap, tc).xyz;
|
||||
vec4 color = texture(Albedo, uv);
|
||||
float ao = texture(SSAO, tc).x;
|
||||
|
||||
vec3 col = texture(tex, tc).xyz;
|
||||
float caustic = texture(caustictex, tc + dir).x;
|
||||
float caustic2 = texture(caustictex, (tc.yx + dir2 * vec2(-0.6, 0.3)) * vec2(0.6)).x;
|
||||
float caustic = texture(caustictex, uv + dir).x;
|
||||
float caustic2 = texture(caustictex, (uv.yx + dir2 * vec2(-0.6, 0.3)) * vec2(0.6)).x;
|
||||
|
||||
col += caustic * caustic2 * 10.0;
|
||||
|
||||
FragColor = vec4(col, 1.0);
|
||||
vec3 LightFactor = ao * ambient + DiffuseComponent + SpecularComponent + caustic * caustic2 * 10;
|
||||
FragColor = vec4(color.xyz * LightFactor, 1.);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330 compatibility
|
||||
uniform sampler2D tex;
|
||||
uniform sampler2D oldtex;
|
||||
uniform vec2 pixel;
|
||||
|
||||
@@ -1,20 +1,34 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform sampler2D dtex;
|
||||
uniform vec3 inlevel;
|
||||
uniform vec2 outlevel;
|
||||
uniform mat4 invprojm;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 texc = uv;
|
||||
//texc.y = 1.0 - texc.y;
|
||||
vec4 col = texture(tex, uv);
|
||||
|
||||
float curdepth = texture(dtex, uv).x;
|
||||
vec4 FragPos = invprojm * (2.0 * vec4(uv, curdepth, 1.0f) - 1.0f);
|
||||
FragPos /= FragPos.w;
|
||||
float depth = clamp(FragPos.z / 180, 0, 1);
|
||||
depth = (1 - depth);
|
||||
|
||||
vec4 col = texture(tex, texc);
|
||||
|
||||
//col = col / (1 - col);
|
||||
// Compute the vignette
|
||||
vec2 inside = uv - 0.5;
|
||||
float vignette = 1 - dot(inside, inside);
|
||||
vignette = clamp(pow(vignette, 0.8), 0, 1);
|
||||
vignette = clamp(vignette + vignette - 0.5, 0, 1.15);
|
||||
|
||||
float inBlack = inlevel.x;
|
||||
float inWhite = inlevel.z;
|
||||
@@ -23,8 +37,11 @@ void main()
|
||||
float outBlack = outlevel.x;
|
||||
float outWhite = outlevel.y;
|
||||
|
||||
col.rgb = (pow(((col.rgb * 255.0) - inBlack) / (inWhite - inBlack),
|
||||
vec3 colSat = (pow(((col.rgb * 255.0) - inBlack) / (inWhite - inBlack),
|
||||
vec3(1.0 / inGamma)) * (outWhite - outBlack) + outBlack) / 255.0;
|
||||
|
||||
vec3 colFinal = colSat * depth + col.rgb * (1 - depth);
|
||||
|
||||
FragColor = vec4(col.rgb, 1.0);
|
||||
FragColor = vec4(colFinal * vignette, 1.0);
|
||||
//FragColor = vec4(vec3(depth), 1.0);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#version 330
|
||||
uniform ivec4 color;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
#version 330
|
||||
uniform vec2 center;
|
||||
uniform vec2 size;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 position;
|
||||
#else
|
||||
attribute vec2 position;
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#version 330
|
||||
uniform vec3 col;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
#version 130
|
||||
uniform vec3 col;
|
||||
uniform sampler2D tex;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
float alpha = texture(tex, gl_TexCoord[0].xy).a;
|
||||
if (alpha < 0.5)
|
||||
discard;
|
||||
|
||||
FragColor = vec4(col, 1.0);
|
||||
}
|
||||
@@ -1,9 +1,16 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
in vec4 col;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
varying vec4 col;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
#version 330
|
||||
uniform vec2 center;
|
||||
uniform vec2 size;
|
||||
uniform vec2 texcenter;
|
||||
uniform vec2 texsize;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 position;
|
||||
in vec2 texcoord;
|
||||
in uvec4 color;
|
||||
out vec2 uv;
|
||||
out vec4 col;
|
||||
#else
|
||||
attribute vec2 position;
|
||||
attribute vec2 texcoord;
|
||||
attribute uvec4 color;
|
||||
varying vec2 uv;
|
||||
varying vec4 col;
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D Albedo;
|
||||
uniform sampler2D Detail;
|
||||
uniform sampler2D DiffuseMap;
|
||||
@@ -6,9 +5,18 @@ uniform sampler2D SpecularMap;
|
||||
uniform sampler2D SSAO;
|
||||
uniform vec2 screen;
|
||||
uniform vec3 ambient;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
in vec2 uv_bis;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
varying vec2 uv_bis;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
49
data/shaders/diffuseenvmap.frag
Normal file
49
data/shaders/diffuseenvmap.frag
Normal file
@@ -0,0 +1,49 @@
|
||||
uniform float blueLmn[9];
|
||||
uniform float greenLmn[9];
|
||||
uniform float redLmn[9];
|
||||
uniform sampler2D ntex;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 Diff;
|
||||
out vec4 Spec;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define Diff gl_FragData[0]
|
||||
#define Spec gl_FragData[1]
|
||||
#endif
|
||||
|
||||
vec3 DecodeNormal(vec2 n)
|
||||
{
|
||||
float z = dot(n, n) * 2. - 1.;
|
||||
vec2 xy = normalize(n) * sqrt(1. - z * z);
|
||||
return vec3(xy,z);
|
||||
}
|
||||
|
||||
mat4 getMatrix(float L[9])
|
||||
{
|
||||
float c1 = 0.429043, c2 = 0.511664, c3 = 0.743125, c4 = 0.886227, c5 = 0.247708;
|
||||
|
||||
return mat4(
|
||||
c1 * L[8] /*L22*/, c1 * L[4] /*L2-2*/, c1 * L[7] /*L21*/, c2 * L[3] /*L11*/,
|
||||
c1 * L[4], - c1 * L[8], c1 * L[5] /*L2-1*/, c2 * L[1] /*L1-1*/,
|
||||
c1 * L[7], c1 * L[5], c3 * L[6] /*L20*/, c2 * L[2] /*L10*/,
|
||||
c2 * L[3], c2 * L[1], c2 * L[2], c4 * L[0] /*L00*/ - c5 * L[6]
|
||||
);
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec3 normal = normalize(DecodeNormal(2. * texture(ntex, uv).xy - 1.));
|
||||
vec4 extendednormal = vec4(normal, 1.);
|
||||
mat4 rmat = getMatrix(redLmn);
|
||||
mat4 gmat = getMatrix(greenLmn);
|
||||
mat4 bmat = getMatrix(blueLmn);
|
||||
|
||||
float r = dot(extendednormal, rmat * extendednormal);
|
||||
float g = dot(extendednormal, gmat * extendednormal);
|
||||
float b = dot(extendednormal, bmat * extendednormal);
|
||||
|
||||
Diff = 0.25 * vec4(r, g, b, .1);
|
||||
Spec = vec4(0.);
|
||||
}
|
||||
@@ -1,19 +1,29 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform sampler2D displacement_tex;
|
||||
uniform sampler2D mask_tex;
|
||||
uniform sampler2D color_tex;
|
||||
uniform vec2 screen;
|
||||
uniform vec2 dir;
|
||||
uniform vec2 dir2;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
in vec2 uv_bis;
|
||||
in float camdist;
|
||||
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
varying vec2 uv_bis;
|
||||
varying float camdist;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
const float maxlen = 0.02;
|
||||
|
||||
void main()
|
||||
{
|
||||
float horiz = texture(tex, uv + dir).x;
|
||||
float vert = texture(tex, (uv.yx + dir2) * vec2(0.9)).x;
|
||||
float horiz = texture(displacement_tex, uv + dir).x;
|
||||
float vert = texture(displacement_tex, (uv.yx + dir2) * vec2(0.9)).x;
|
||||
|
||||
vec2 offset = vec2(horiz, vert);
|
||||
offset *= 2.0;
|
||||
@@ -30,11 +40,20 @@ void main()
|
||||
|
||||
offset *= 50.0 * fade * maxlen;
|
||||
|
||||
vec4 col;
|
||||
col.r = step(offset.x, 0.0) * -offset.x;
|
||||
col.g = step(0.0, offset.x) * offset.x;
|
||||
col.b = step(offset.y, 0.0) * -offset.y;
|
||||
col.a = step(0.0, offset.y) * offset.y;
|
||||
vec4 shiftval;
|
||||
shiftval.r = step(offset.x, 0.0) * -offset.x;
|
||||
shiftval.g = step(0.0, offset.x) * offset.x;
|
||||
shiftval.b = step(offset.y, 0.0) * -offset.y;
|
||||
shiftval.a = step(0.0, offset.y) * offset.y;
|
||||
|
||||
FragColor = col;
|
||||
vec2 shift;
|
||||
shift.x = -shiftval.x + shiftval.y;
|
||||
shift.y = -shiftval.z + shiftval.w;
|
||||
shift /= 50.;
|
||||
|
||||
vec2 tc = gl_FragCoord.xy / screen;
|
||||
float mask = texture(mask_tex, tc + shift).x;
|
||||
tc += (mask < 1.) ? vec2(0.) : shift;
|
||||
|
||||
FragColor = texture(color_tex, tc);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,23 @@
|
||||
#version 330
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 ModelViewMatrix;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 Position;
|
||||
in vec2 Texcoord;
|
||||
in vec2 SecondTexcoord;
|
||||
out vec2 uv;
|
||||
out vec2 uv_bis;
|
||||
out float camdist;
|
||||
#else
|
||||
attribute vec3 Position;
|
||||
attribute vec2 Texcoord;
|
||||
attribute vec2 SecondTexcoord;
|
||||
varying vec2 uv;
|
||||
varying vec2 uv_bis;
|
||||
varying float camdist;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void main() {
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330 compatibility
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
void main() {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform mat4 ProjectionMatrix;
|
||||
uniform mat4 ViewMatrix;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
|
||||
uniform float fogmax;
|
||||
@@ -9,8 +8,14 @@ uniform float end;
|
||||
uniform vec3 col;
|
||||
uniform mat4 ipvmat;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform vec2 pixel;
|
||||
|
||||
// Gaussian separated blur with radius 3.
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform vec2 pixel;
|
||||
|
||||
// Gaussian separated blur with radius 3.
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform vec2 pixel;
|
||||
|
||||
// Gaussian separated blur with radius 6.
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform vec2 pixel;
|
||||
|
||||
// Gaussian separated blur with radius 6.
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
#version 330 compatibility
|
||||
uniform sampler2D tex;
|
||||
uniform vec3 col;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 res = texture(tex, gl_TexCoord[0].xy);
|
||||
vec4 res = texture(tex, uv);
|
||||
|
||||
// Keep the sun fully bright, but fade the sky
|
||||
float mul = distance(res.xyz, col);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330 compatibility
|
||||
uniform sampler2D tex;
|
||||
uniform vec2 sunpos;
|
||||
|
||||
@@ -6,14 +5,20 @@ uniform vec2 sunpos;
|
||||
|
||||
const float decaystep = 0.88;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 texc = gl_TexCoord[0].xy;
|
||||
vec2 texc = uv;
|
||||
vec2 tosun = sunpos - texc;
|
||||
|
||||
if (dot(tosun, tosun) > 0.49) discard;
|
||||
// if (dot(tosun, tosun) > 0.49) discard;
|
||||
|
||||
vec2 dist = tosun * 1.0/(float(SAMPLES) * 1.12);
|
||||
|
||||
|
||||
@@ -1,14 +1,24 @@
|
||||
#version 330
|
||||
uniform vec3 windDir;
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 TransposeInverseModelView;
|
||||
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 Position;
|
||||
in vec3 Normal;
|
||||
in vec2 Texcoord;
|
||||
in vec4 Color;
|
||||
noperspective out vec3 nor;
|
||||
out vec3 nor;
|
||||
out vec2 uv;
|
||||
#else
|
||||
attribute vec3 Position;
|
||||
attribute vec3 Normal;
|
||||
attribute vec2 Texcoord;
|
||||
attribute vec4 Color;
|
||||
varying vec3 nor;
|
||||
varying vec2 uv;
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
#version 330
|
||||
uniform vec3 windDir;
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 Position;
|
||||
in vec2 Texcoord;
|
||||
in vec4 Color;
|
||||
out vec2 uv;
|
||||
#else
|
||||
attribute vec3 Position;
|
||||
attribute vec2 Texcoord;
|
||||
attribute vec4 Color;
|
||||
varying vec2 uv;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#version 330 compatibility
|
||||
|
||||
uniform sampler2D tex;
|
||||
uniform vec2 texsize;
|
||||
uniform int notex;
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
// The actual boost amount (which linearly scales the blur to be shown).
|
||||
// should be in the range [0.0, 1.0], though a larger value might make
|
||||
// the blurring too string. Atm we are using [0, 0.5].
|
||||
#version 330 compatibility
|
||||
uniform float boost_amount;
|
||||
|
||||
// The color buffer to use.
|
||||
@@ -41,14 +40,20 @@ uniform float mask_radius;
|
||||
// Maximum height of texture used
|
||||
uniform float max_tex_height;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
// Number of samples used for blurring
|
||||
#define NB_SAMPLES 8
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 texcoords = gl_TexCoord[0].st;
|
||||
vec2 texcoords = uv;
|
||||
|
||||
// Sample the color buffer
|
||||
vec3 color = texture(color_buffer, texcoords).rgb;
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2013 the SuperTuxKart team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
// motion_blur.vert
|
||||
#version 330 compatibility
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_TexCoord[0].st = vec2(gl_MultiTexCoord0.s, gl_MultiTexCoord0.t);
|
||||
gl_Position = gl_Vertex;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330 compatibility
|
||||
uniform sampler2D tex1;
|
||||
uniform sampler2D tex2;
|
||||
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
#version 330
|
||||
uniform sampler2D normalMap;
|
||||
|
||||
noperspective in vec3 tangent;
|
||||
noperspective in vec3 bitangent;
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 tangent;
|
||||
in vec3 bitangent;
|
||||
in vec2 uv;
|
||||
out vec2 EncodedNormal;
|
||||
#else
|
||||
varying vec3 tangent;
|
||||
varying vec3 bitangent;
|
||||
varying vec2 uv;
|
||||
#define EncodedNormal gl_FragColor.xy
|
||||
#endif
|
||||
|
||||
|
||||
// from Crytek "a bit more deferred CryEngine"
|
||||
vec2 EncodeNormal(vec3 n)
|
||||
|
||||
@@ -1,14 +1,25 @@
|
||||
#version 330
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 TransposeInverseModelView;
|
||||
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 Position;
|
||||
in vec2 Texcoord;
|
||||
in vec3 Tangent;
|
||||
in vec3 Bitangent;
|
||||
noperspective out vec3 tangent;
|
||||
noperspective out vec3 bitangent;
|
||||
out vec3 tangent;
|
||||
out vec3 bitangent;
|
||||
out vec2 uv;
|
||||
#else
|
||||
attribute vec3 Position;
|
||||
attribute vec2 Texcoord;
|
||||
attribute vec3 Tangent;
|
||||
attribute vec3 Bitangent;
|
||||
varying vec3 tangent;
|
||||
varying vec3 bitangent;
|
||||
varying vec2 uv;
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
#version 330
|
||||
noperspective in vec3 nor;
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 nor;
|
||||
out vec2 EncodedNormal;
|
||||
#else
|
||||
varying vec3 nor;
|
||||
#define EncodedNormal gl_FragColor.xy
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// from Crytek "a bit more deferred CryEngine"
|
||||
vec2 EncodeNormal(vec3 n)
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
#version 330
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 TransposeInverseModelView;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 Position;
|
||||
in vec3 Normal;
|
||||
noperspective out vec3 nor;
|
||||
out vec3 nor;
|
||||
#else
|
||||
attribute vec3 Position;
|
||||
attribute vec3 Normal;
|
||||
varying vec3 nor;
|
||||
#endif
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D Albedo;
|
||||
uniform sampler2D DiffuseMap;
|
||||
uniform sampler2D SpecularMap;
|
||||
@@ -6,8 +5,14 @@ uniform sampler2D SSAO;
|
||||
uniform vec2 screen;
|
||||
uniform vec3 ambient;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
@@ -1,15 +1,28 @@
|
||||
#version 330
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 TextureMatrix =
|
||||
mat4(1., 0., 0., 0.,
|
||||
0., 1., 0., 0.,
|
||||
0., 0., 1., 0.,
|
||||
0., 0., 0., 1.);
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 Position;
|
||||
in vec2 Texcoord;
|
||||
in vec2 SecondTexcoord;
|
||||
out vec2 uv;
|
||||
out vec2 uv_bis;
|
||||
#else
|
||||
attribute vec3 Position;
|
||||
attribute vec2 Texcoord;
|
||||
attribute vec2 SecondTexcoord;
|
||||
varying vec2 uv;
|
||||
varying vec2 uv_bis;
|
||||
#endif
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
uv = Texcoord;
|
||||
uv = (TextureMatrix * vec4(Texcoord, 1., 1.)).xy;
|
||||
uv_bis = SecondTexcoord;
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform sampler2D lighttex;
|
||||
uniform int hastex;
|
||||
uniform int haslightmap;
|
||||
|
||||
noperspective in vec3 nor;
|
||||
in vec4 color;
|
||||
in vec2 uv0;
|
||||
in vec2 uv1;
|
||||
out vec4 Albedo;
|
||||
out vec4 NormalDepth;
|
||||
out vec4 Specular;
|
||||
|
||||
void main() {
|
||||
vec4 light = vec4(1.0);
|
||||
vec4 col;
|
||||
|
||||
if (haslightmap != 0) {
|
||||
light = texture(lighttex, uv1);
|
||||
}
|
||||
|
||||
if (hastex != 0)
|
||||
col = texture(tex, uv0) * light;
|
||||
else
|
||||
col = color;
|
||||
|
||||
Albedo = vec4(col.xyz, 1.);
|
||||
NormalDepth = vec4(0.5 * normalize(nor) + 0.5, gl_FragCoord.z);
|
||||
Specular = vec4(1. - col.a);
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#version 330
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 TransposeInverseModelView;
|
||||
uniform mat4 TextureMatrix0;
|
||||
uniform mat4 TextureMatrix1;
|
||||
|
||||
noperspective out vec3 nor;
|
||||
out vec4 color;
|
||||
out vec2 uv0;
|
||||
out vec2 uv1;
|
||||
|
||||
void main() {
|
||||
|
||||
nor = (TransposeInverseModelView * vec4(gl_Normal, 1.)).xyz;
|
||||
uv0 = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st;
|
||||
uv1 = (gl_TextureMatrix[1] * gl_MultiTexCoord1).st;
|
||||
gl_Position = ModelViewProjectionMatrix * gl_Vertex;
|
||||
color = gl_Color;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform int hastex;
|
||||
uniform float objectid;
|
||||
|
||||
noperspective in vec3 nor;
|
||||
in vec2 uv0;
|
||||
in vec2 uv1;
|
||||
out vec4 Albedo;
|
||||
out vec4 NormalDepth;
|
||||
out vec4 Specular;
|
||||
|
||||
void main() {
|
||||
|
||||
//if (hastex != 0) {
|
||||
vec4 col = texture(tex, uv0);
|
||||
|
||||
if (col.a < 0.5)
|
||||
discard;
|
||||
|
||||
Albedo = vec4(col.xyz, 1.);
|
||||
//} else {
|
||||
// Albedo = gl_Color;
|
||||
//}
|
||||
|
||||
NormalDepth = vec4(0.5 * normalize(nor) + 0.5, gl_FragCoord.z);
|
||||
Specular = vec4(1. - col.a);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D Albedo;
|
||||
uniform sampler2D DiffuseMap;
|
||||
uniform sampler2D SpecularMap;
|
||||
@@ -6,10 +5,15 @@ uniform sampler2D SSAO;
|
||||
uniform vec2 screen;
|
||||
uniform vec3 ambient;
|
||||
|
||||
noperspective in vec3 normal;
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 normal;
|
||||
in vec2 uv;
|
||||
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec3 normal;
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
void main() {
|
||||
float rim = 1.0 - dot(normal, vec3(0., 0., -1));
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
#version 330
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 TransposeInverseModelView;
|
||||
uniform mat4 TextureMatrix;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 Position;
|
||||
in vec3 Normal;
|
||||
in vec2 Texcoord;
|
||||
in vec4 Color;
|
||||
out vec2 uv;
|
||||
noperspective out vec3 normal;
|
||||
out vec3 normal;
|
||||
#else
|
||||
attribute vec3 Position;
|
||||
attribute vec3 Normal;
|
||||
attribute vec2 Texcoord;
|
||||
attribute vec4 Color;
|
||||
varying vec2 uv;
|
||||
varying vec3 normal;
|
||||
#endif
|
||||
|
||||
void main() {
|
||||
normal = (TransposeInverseModelView * vec4(Normal, 0)).xyz;
|
||||
uv = Texcoord;
|
||||
uv = (TextureMatrix * vec4(Texcoord, 1., 1.)).xy;
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
|
||||
}
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform samplerCube tex;
|
||||
uniform mat4 invproj;
|
||||
uniform vec2 screen;
|
||||
|
||||
noperspective in vec3 nor;
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 nor;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec3 nor;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main() {
|
||||
// Calculate the spherical UV
|
||||
const vec3 forward = vec3(0.0, 0.0, 1.0);
|
||||
vec3 fpos = gl_FragCoord.xyz / vec3(screen, 1.);
|
||||
vec4 xpos = 2.0 * vec4(fpos, 1.0) - 1.0;
|
||||
xpos = invproj * xpos;
|
||||
|
||||
// get the angle between the forward vector and the horizontal portion of the normal
|
||||
vec3 normal_x = normalize(vec3(nor.x, 0.0, nor.z));
|
||||
float sin_theta_x = length(cross( forward, normal_x )) * nor.x / abs(nor.x);
|
||||
xpos.xyz /= xpos.w;
|
||||
vec4 detail0 = texture(tex, reflect(xpos.xyz, nor));
|
||||
|
||||
// get the angle between the forward vector and the vertical portion of the normal
|
||||
vec3 normal_y = normalize(vec3(0.0, nor.y, nor.z));
|
||||
float sin_theta_y = length(cross( forward, normal_y )) * nor.y / abs(nor.y);
|
||||
|
||||
vec4 detail0 = texture(tex, 0.5 * vec2(sin_theta_x, sin_theta_y) + 0.5);
|
||||
|
||||
FragColor = vec4(detail0.xyz, 1.);
|
||||
FragColor = vec4(detail0.xyz, 1.);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
|
||||
noperspective in vec3 nor;
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 nor;
|
||||
in vec2 uv;
|
||||
out vec2 EncodedNormal;
|
||||
#else
|
||||
varying vec3 nor;
|
||||
varying vec2 uv;
|
||||
#define EncodedNormal gl_FragColor.xy
|
||||
#endif
|
||||
|
||||
|
||||
// from Crytek "a bit more deferred CryEngine"
|
||||
vec2 EncodeNormal(vec3 n)
|
||||
|
||||
@@ -1,16 +1,30 @@
|
||||
#version 330
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 TransposeInverseModelView;
|
||||
uniform mat4 TextureMatrix =
|
||||
mat4(1., 0., 0., 0.,
|
||||
0., 1., 0., 0.,
|
||||
0., 0., 1., 0.,
|
||||
0., 0., 0., 1.);
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 Position;
|
||||
in vec3 Normal;
|
||||
in vec2 Texcoord;
|
||||
noperspective out vec3 nor;
|
||||
out vec3 nor;
|
||||
out vec2 uv;
|
||||
#else
|
||||
attribute vec3 Position;
|
||||
attribute vec3 Normal;
|
||||
attribute vec2 Texcoord;
|
||||
varying vec3 nor;
|
||||
varying vec2 uv;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
uv = Texcoord;
|
||||
uv = (TextureMatrix * vec4(Texcoord, 1., 1.)).xy;
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
|
||||
nor = (TransposeInverseModelView * vec4(Normal, 0.)).xyz;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
#version 330
|
||||
uniform sampler2D Albedo;
|
||||
uniform sampler2D DiffuseMap;
|
||||
uniform sampler2D SpecularMap;
|
||||
uniform sampler2D SSAO;
|
||||
uniform vec2 screen;
|
||||
uniform vec3 ambient;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform sampler2D dtex;
|
||||
uniform mat4 invproj;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform mat4 ProjectionMatrix;
|
||||
uniform mat4 ViewMatrix;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform int dt;
|
||||
uniform mat4 sourcematrix;
|
||||
uniform int level;
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform vec2 pixel;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
// Separated penumbra, horizontal
|
||||
|
||||
void main()
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform vec2 pixel;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
// Separated penumbra, vertical
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform int dt;
|
||||
uniform mat4 sourcematrix;
|
||||
uniform int level;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D ntex;
|
||||
uniform sampler2D dtex;
|
||||
|
||||
@@ -9,9 +8,16 @@ uniform float spec;
|
||||
uniform mat4 invproj;
|
||||
uniform mat4 viewm;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 Diffuse;
|
||||
out vec4 Specular;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define Diffuse gl_FragData[0]
|
||||
#define Specular gl_FragData[1]
|
||||
#endif
|
||||
|
||||
|
||||
vec3 DecodeNormal(vec2 n)
|
||||
{
|
||||
@@ -49,8 +55,7 @@ void main() {
|
||||
// Reflected light dir
|
||||
vec3 R = reflect(-L, norm);
|
||||
float RdotE = max(0.0, dot(R, eyedir));
|
||||
float Specular = pow(RdotE, spec);
|
||||
specular += Specular * light_col * spec_att;
|
||||
specular += pow(RdotE, spec) * light_col * spec_att;
|
||||
}
|
||||
|
||||
Diffuse = vec4(diffuse, 1.);
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform sampler2D dtex;
|
||||
|
||||
uniform int viz;
|
||||
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 tc = uv;
|
||||
|
||||
vec4 shiftval = texture(dtex, tc) / vec4(50.0);
|
||||
vec2 shift;
|
||||
shift.x = -shiftval.x + shiftval.y;
|
||||
shift.y = -shiftval.z + shiftval.w;
|
||||
|
||||
tc += shift;
|
||||
|
||||
vec4 newcol = texture(tex, tc);
|
||||
|
||||
if (viz < 1)
|
||||
{
|
||||
FragColor = newcol;
|
||||
} else
|
||||
{
|
||||
FragColor = shiftval * vec4(50.0);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
uniform sampler2D normals_and_depth;
|
||||
uniform mat4 invproj;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform float screenw;
|
||||
|
||||
void main()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform float time;
|
||||
uniform vec3 campos;
|
||||
uniform mat4 viewm;
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
#version 330
|
||||
|
||||
in vec2 Position;
|
||||
in vec2 Texcoord;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
out vec2 uv;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#endif
|
||||
|
||||
|
||||
void main() {
|
||||
uv = Texcoord;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform mat4 ModelViewProjectionMatrix[4];
|
||||
|
||||
layout(triangles) in;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#version 330
|
||||
|
||||
in vec3 Position;
|
||||
in vec2 Texcoord;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D halft; // half is a reserved word
|
||||
uniform sampler2D quarter;
|
||||
uniform sampler2D eighth;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330 compatibility
|
||||
uniform sampler2D ntex;
|
||||
uniform sampler2D ctex;
|
||||
uniform vec3 campos;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330 compatibility
|
||||
uniform sampler2D dtex;
|
||||
uniform mat4 ipvmat;
|
||||
uniform mat4 shadowmat;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330 compatibility
|
||||
uniform sampler2D tex;
|
||||
uniform int hastex;
|
||||
uniform int viz;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330 compatibility
|
||||
uniform sampler2D warpx;
|
||||
uniform sampler2D warpy;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330 compatibility
|
||||
uniform sampler2D tex;
|
||||
uniform int size;
|
||||
uniform vec2 pixel;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330 compatibility
|
||||
uniform sampler2D tex;
|
||||
uniform int size;
|
||||
uniform vec2 pixel;
|
||||
|
||||
21
data/shaders/sky.frag
Normal file
21
data/shaders/sky.frag
Normal file
@@ -0,0 +1,21 @@
|
||||
uniform samplerCube tex;
|
||||
uniform mat4 InvProjView;
|
||||
uniform vec2 screen;
|
||||
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec3 eyedir = gl_FragCoord.xyz / vec3(screen, 1.);
|
||||
eyedir = 2.0 * eyedir - 1.0;
|
||||
vec4 tmp = (InvProjView * vec4(eyedir, 1.));
|
||||
eyedir = tmp.xyz / tmp.w;
|
||||
vec4 color = texture(tex, eyedir);
|
||||
FragColor = vec4(color.xyz, 1.);
|
||||
}
|
||||
@@ -14,7 +14,6 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#version 330 compatibility
|
||||
uniform sampler2D tex;
|
||||
uniform sampler2D glow_tex;
|
||||
uniform float transparency;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
|
||||
// Creates a bubble (wave) effect by distorting the texture depending on time
|
||||
#version 330 compatibility
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform float time;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D tex_layout;
|
||||
uniform sampler2D tex_detail0;
|
||||
uniform sampler2D tex_detail1;
|
||||
@@ -10,9 +9,16 @@ uniform sampler2D SSAO;
|
||||
uniform vec2 screen;
|
||||
uniform vec3 ambient;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
in vec2 uv_bis;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
varying vec2 uv_bis;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main() {
|
||||
// Splatting part
|
||||
|
||||
@@ -15,15 +15,23 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#version 330
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 TransposeInverseModelView;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 Position;
|
||||
in vec2 Texcoord;
|
||||
in vec2 SecondTexcoord;
|
||||
out vec2 uv;
|
||||
out vec2 uv_bis;
|
||||
#else
|
||||
attribute vec3 Position;
|
||||
attribute vec2 Texcoord;
|
||||
attribute vec2 SecondTexcoord;
|
||||
varying vec2 uv;
|
||||
varying vec2 uv_bis;
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D ntex;
|
||||
uniform sampler2D dtex;
|
||||
uniform sampler2D noise_texture;
|
||||
@@ -6,8 +5,13 @@ uniform mat4 invprojm;
|
||||
uniform mat4 projm;
|
||||
uniform vec4 samplePoints[16];
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out float ao;
|
||||
out float AO;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define AO gl_FragColor.x
|
||||
#endif
|
||||
|
||||
const float strengh = 4.;
|
||||
const float radius = .4f;
|
||||
@@ -39,7 +43,7 @@ void main(void)
|
||||
vec3 norm = normalize(DecodeNormal(2. * texture(ntex, uv).xy - 1.));
|
||||
// Workaround for nvidia and skyboxes
|
||||
float len = dot(vec3(1.0), abs(cur.xyz));
|
||||
if (len < 0.2 || curdepth > 0.999) discard;
|
||||
if (len < 0.2 || curdepth > 0.9955) discard;
|
||||
// Make a tangent as random as possible
|
||||
vec3 randvect = rand(uv);
|
||||
vec3 tangent = normalize(cross(norm, randvect));
|
||||
@@ -65,5 +69,5 @@ void main(void)
|
||||
bl += isOccluded ? smoothstep(radius, 0, distance(samplePos, FragPos)) : 0.;
|
||||
}
|
||||
|
||||
ao = 1.0 - bl * invSamples;
|
||||
AO = 1.0 - bl * invSamples;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D ntex;
|
||||
uniform sampler2D dtex;
|
||||
//uniform sampler2D cloudtex;
|
||||
@@ -9,9 +8,16 @@ uniform mat4 invproj;
|
||||
//uniform int hasclouds;
|
||||
//uniform vec2 wind;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 Diff;
|
||||
out vec4 Spec;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define Diff gl_FragData[0]
|
||||
#define Spec gl_FragData[1]
|
||||
#endif
|
||||
|
||||
|
||||
vec3 DecodeNormal(vec2 n)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D ntex;
|
||||
uniform sampler2D dtex;
|
||||
uniform sampler2DArrayShadow shadowtex;
|
||||
@@ -13,9 +12,16 @@ uniform mat4 shadowmat[4];
|
||||
//uniform vec2 wind;
|
||||
//uniform float shadowoffset;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 Diff;
|
||||
out vec4 Spec;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define Diff gl_FragData[0]
|
||||
#define Spec gl_FragData[1]
|
||||
#endif
|
||||
|
||||
|
||||
vec3 DecodeNormal(vec2 n)
|
||||
{
|
||||
@@ -24,13 +30,20 @@ vec3 DecodeNormal(vec2 n)
|
||||
return vec3(xy,z);
|
||||
}
|
||||
|
||||
float getShadowFactor(vec3 pos, float bias)
|
||||
float getShadowFactor(vec3 pos, float bias, int index)
|
||||
{
|
||||
if (pos.z < 5.)
|
||||
{
|
||||
vec4 shadowcoord = (shadowmat[0] * vec4(pos, 1.0));
|
||||
shadowcoord /= shadowcoord.w;
|
||||
vec2 shadowtexcoord = shadowcoord.xy * 0.5 + 0.5;
|
||||
//float a[5] = float[](3.4, 4.2, 5.0, 5.2, 1.1);
|
||||
|
||||
const vec2 shadowoffset[4] = vec2[](
|
||||
vec2(-1., -1.),
|
||||
vec2(-1., 1.),
|
||||
vec2(1., -1.),
|
||||
vec2(1., 1.)
|
||||
);
|
||||
|
||||
vec4 shadowcoord = (shadowmat[index] * vec4(pos, 1.0));
|
||||
shadowcoord /= shadowcoord.w;
|
||||
vec2 shadowtexcoord = shadowcoord.xy * 0.5 + 0.5;
|
||||
// shadowcoord = (shadowcoord * 0.5) + vec3(0.5);
|
||||
|
||||
// float movex = decdepth(texture(warpx, shadowcoord.xy));
|
||||
@@ -39,31 +52,14 @@ float getShadowFactor(vec3 pos, float bias)
|
||||
// float dy = movey * 2.0 - 1.0;
|
||||
// shadowcoord.xy += vec2(dx, dy);*/
|
||||
|
||||
//float shadowmapz = 2. * texture(shadowtex, vec3(shadowtexcoord, shadowcoord.z).x - 1.;
|
||||
// bias += smoothstep(0.001, 0.1, moved) * 0.014; // According to the warping
|
||||
return texture(shadowtex, vec4(shadowtexcoord, 0., 0.5 * (shadowcoord.z + bias * 0.001) + 0.5));
|
||||
}
|
||||
else if (pos.z < 10.)
|
||||
//float shadowmapz = 2. * texture(shadowtex, vec3(shadowtexcoord, shadowcoord.z).x - 1.;
|
||||
// bias += smoothstep(0.001, 0.1, moved) * 0.014; // According to the warping
|
||||
float sum = 0.;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
vec4 shadowcoord = (shadowmat[1] * vec4(pos, 1.0));
|
||||
shadowcoord /= shadowcoord.w;
|
||||
vec2 shadowtexcoord = shadowcoord.xy * 0.5 + 0.5;
|
||||
return texture(shadowtex, vec4(shadowtexcoord, 1., 0.5 * (shadowcoord.z + bias * 0.001) + 0.5));
|
||||
}
|
||||
else if (pos.z < 75.)
|
||||
{
|
||||
vec4 shadowcoord = (shadowmat[2] * vec4(pos, 1.0));
|
||||
shadowcoord /= shadowcoord.w;
|
||||
vec2 shadowtexcoord = shadowcoord.xy * 0.5 + 0.5;
|
||||
return texture(shadowtex, vec4(shadowtexcoord, 2., 0.5 * (shadowcoord.z + bias * 0.001) + 0.5));
|
||||
}
|
||||
else
|
||||
{
|
||||
vec4 shadowcoord = (shadowmat[3] * vec4(pos, 1.0));
|
||||
shadowcoord /= shadowcoord.w;
|
||||
vec2 shadowtexcoord = shadowcoord.xy * 0.5 + 0.5;
|
||||
return texture(shadowtex, vec4(shadowtexcoord, 3., 0.5 * (shadowcoord.z + bias) + 0.5));
|
||||
sum += texture(shadowtex, vec4(shadowtexcoord + 0.0005 * shadowoffset[i], float(index), 0.5 * (shadowcoord.z + bias * 0.001) + 0.5));
|
||||
}
|
||||
return sum / 4.;
|
||||
}
|
||||
|
||||
void main() {
|
||||
@@ -96,7 +92,30 @@ void main() {
|
||||
// Shadows
|
||||
float bias = 0.002 * tan(acos(NdotL)); // According to the slope
|
||||
bias = clamp(bias, 0.001, 0.014);
|
||||
float factor = getShadowFactor(xpos.xyz, bias);
|
||||
float factor;
|
||||
if (xpos.z < 20.)
|
||||
factor = getShadowFactor(xpos.xyz, bias, 0);
|
||||
else if (xpos.z < 25.)
|
||||
{
|
||||
float a = getShadowFactor(xpos.xyz, bias, 0), b = getShadowFactor(xpos.xyz, bias, 1);
|
||||
factor = mix(a, b, (xpos.z - 20.) / 5.);
|
||||
}
|
||||
else if (xpos.z < 50.)
|
||||
factor = getShadowFactor(xpos.xyz, bias, 1);
|
||||
else if (xpos.z < 60.)
|
||||
{
|
||||
float a = getShadowFactor(xpos.xyz, bias, 1), b = getShadowFactor(xpos.xyz, bias, 2);
|
||||
factor = mix(a, b, (xpos.z - 50.) / 10.);
|
||||
}
|
||||
else if (xpos.z < 100.)
|
||||
factor = getShadowFactor(xpos.xyz, bias, 2);
|
||||
else if (xpos.z < 120.)
|
||||
{
|
||||
float a = getShadowFactor(xpos.xyz, bias, 2), b = getShadowFactor(xpos.xyz, bias, 3);
|
||||
factor = mix(a, b, (xpos.z - 100.) / 20.);
|
||||
}
|
||||
else
|
||||
factor = getShadowFactor(xpos.xyz, bias, 3);
|
||||
Diff = vec4(factor * NdotL * col, 1.);
|
||||
Spec = vec4(factor * Specular * col, 1.);
|
||||
return;
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
#version 330
|
||||
uniform vec2 center;
|
||||
uniform vec2 size;
|
||||
uniform vec2 texcenter;
|
||||
uniform vec2 texsize;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 position;
|
||||
in vec2 texcoord;
|
||||
out vec2 uv;
|
||||
#else
|
||||
attribute vec2 position;
|
||||
attribute vec2 texcoord;
|
||||
varying vec2 uv;
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
#version 330
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 TextureMatrix;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 Position;
|
||||
in vec2 Texcoord;
|
||||
out vec2 uv;
|
||||
#else
|
||||
attribute vec3 Position;
|
||||
attribute vec2 Texcoord;
|
||||
varying vec2 uv;
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
uv = Texcoord;
|
||||
uv = (TextureMatrix * vec4(Texcoord, 1., 1.)).xy;
|
||||
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#version 330
|
||||
uniform sampler2D tex;
|
||||
|
||||
uniform float fogmax;
|
||||
@@ -10,8 +9,14 @@ uniform vec3 col;
|
||||
uniform mat4 ipvmat;
|
||||
uniform vec2 screen;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec2 uv;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
#version 330
|
||||
uniform sampler2D DiffuseMap;
|
||||
uniform sampler2D SpecularMap;
|
||||
uniform sampler2D SSAO;
|
||||
uniform vec2 screen;
|
||||
uniform vec3 ambient;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec4 color;
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
varying vec4 color;
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
#version 330
|
||||
uniform mat4 ModelViewProjectionMatrix;
|
||||
|
||||
#if __VERSION__ >= 130
|
||||
in vec3 Position;
|
||||
in vec4 Color;
|
||||
out vec4 color;
|
||||
#else
|
||||
attribute vec3 Position;
|
||||
attribute vec4 Color;
|
||||
varying vec4 color;
|
||||
#endif
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
@@ -8,9 +8,9 @@ uniform sampler2D DecalTex; //The texture
|
||||
uniform vec2 delta1;
|
||||
uniform vec2 delta2;
|
||||
|
||||
noperspective in vec3 lightVec;
|
||||
noperspective in vec3 halfVec;
|
||||
noperspective in vec3 eyeVec;
|
||||
in vec3 lightVec;
|
||||
in vec3 halfVec;
|
||||
in vec3 eyeVec;
|
||||
in vec2 uv;
|
||||
out vec4 FragColor;
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ uniform float waveLength;
|
||||
|
||||
uniform vec3 lightdir;
|
||||
|
||||
noperspective out vec3 lightVec;
|
||||
noperspective out vec3 halfVec;
|
||||
noperspective out vec3 eyeVec;
|
||||
out vec3 lightVec;
|
||||
out vec3 halfVec;
|
||||
out vec3 eyeVec;
|
||||
out vec2 uv;
|
||||
|
||||
void main()
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#version 330
|
||||
#if __VERSION__ >= 130
|
||||
out vec4 FragColor;
|
||||
#else
|
||||
#define FragColor gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(1.0);
|
||||
|
||||
@@ -94,8 +94,15 @@
|
||||
<!-- friction is the friction increase when a parachute is attached.
|
||||
time is the time an attached parachute is active
|
||||
time-other is the time a parachute attached from other kart works
|
||||
done-fraction is the fraction of speed when lost will detach parachute -->
|
||||
<parachute friction="2.0" time="4.0" time-other="8.0" done-fraction="0.7"/>
|
||||
lbound-fraction is the lower bound fraction of speed when lost will
|
||||
detach parachute. E.g. at nearly 0 speed, only 5% of speed
|
||||
need to be lost.
|
||||
ubound-fraction is the upper bound fraction of speed when lost will
|
||||
detach parachute. E.g. at max-speed 30% of speed must be lost.
|
||||
max-speed is a factor that decides the impact of rate of speed
|
||||
(distance between bounds) -->
|
||||
<parachute friction="2.0" time="4.0" time-other="8.0"
|
||||
lbound-fraction="0.95" ubound-fraction="0.7" max-speed="23"/>
|
||||
|
||||
<!-- time is the time till a bomb explodes. time-increase is the time added
|
||||
to timer when bomb is passed on. -->
|
||||
|
||||
@@ -417,8 +417,15 @@ bool COpenGLDriver::initDriver(CIrrDeviceWin32* device)
|
||||
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, //WGL_CONTEXT_CORE_PROFILE_BIT_ARB
|
||||
0
|
||||
};
|
||||
hrc=wglCreateContextAttribs_ARB(HDc, 0, iAttribs);
|
||||
}
|
||||
// hd3000 only provides 3.1, so try all minor versions backwards, to find one that works.
|
||||
for (int minor = 3; minor >= 0; minor--)
|
||||
{
|
||||
iAttribs[3] = minor;
|
||||
hrc = wglCreateContextAttribs_ARB(HDc, 0, iAttribs);
|
||||
if (hrc)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
hrc=wglCreateContext(HDc);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user