Merge branch 'master' of github.com:supertuxkart/stk-code
This commit is contained in:
commit
841ae8814e
@ -78,10 +78,6 @@ if(USE_WIIUSE)
|
|||||||
include_directories("${PROJECT_SOURCE_DIR}/lib/wiiuse")
|
include_directories("${PROJECT_SOURCE_DIR}/lib/wiiuse")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Build the angelscript library
|
|
||||||
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/angelscript/projects/cmake")
|
|
||||||
include_directories("${PROJECT_SOURCE_DIR}/lib/angelscript/include")
|
|
||||||
|
|
||||||
# Set include paths
|
# Set include paths
|
||||||
include_directories(${STK_SOURCE_DIR})
|
include_directories(${STK_SOURCE_DIR})
|
||||||
|
|
||||||
@ -101,6 +97,11 @@ elseif(MSVC)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") # Enable multi-processor compilation (faster)
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") # Enable multi-processor compilation (faster)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# Build the angelscript library
|
||||||
|
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/angelscript/projects/cmake")
|
||||||
|
include_directories("${PROJECT_SOURCE_DIR}/lib/angelscript/include")
|
||||||
|
|
||||||
# OpenAL
|
# OpenAL
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
# In theory it would be cleaner to let CMake detect the right dependencies. In practice, this means that if a OSX user has
|
# In theory it would be cleaner to let CMake detect the right dependencies. In practice, this means that if a OSX user has
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
uniform sampler2D tex;
|
uniform sampler2D tex;
|
||||||
uniform vec2 pixel;
|
uniform vec2 pixel;
|
||||||
|
|
||||||
|
float sigma = 1.;
|
||||||
|
|
||||||
// Gaussian separated blur with radius 6.
|
// Gaussian separated blur with radius 6.
|
||||||
|
|
||||||
out vec4 FragColor;
|
out vec4 FragColor;
|
||||||
@ -8,17 +10,22 @@ out vec4 FragColor;
|
|||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec2 uv = gl_FragCoord.xy * pixel;
|
vec2 uv = gl_FragCoord.xy * pixel;
|
||||||
vec4 sum = vec4(0.0);
|
|
||||||
float X = uv.x;
|
float X = uv.x;
|
||||||
float Y = uv.y;
|
float Y = uv.y;
|
||||||
|
|
||||||
sum += texture(tex, vec2(X - 5.13333 * pixel.x, Y)) * 0.00640869;
|
float g0, g1, g2;
|
||||||
sum += texture(tex, vec2(X - 3.26667 * pixel.x, Y)) * 0.083313;
|
g0 = 1.0 / (sqrt(2.0 * 3.14) * sigma);
|
||||||
sum += texture(tex, vec2(X - 1.4 * pixel.x, Y)) * 0.305481;
|
g1 = exp(-0.5 / (sigma * sigma));
|
||||||
sum += texture(tex, vec2(X, Y)) * 0.209473;
|
g2 = g1 * g1;
|
||||||
sum += texture(tex, vec2(X + 1.4 * pixel.x, Y)) * 0.305481;
|
vec4 sum = texture(tex, vec2(X, Y)) * g0;
|
||||||
sum += texture(tex, vec2(X + 3.26667 * pixel.x, Y)) * 0.083313;
|
g0 *= g1;
|
||||||
sum += texture(tex, vec2(X + 5.13333 * pixel.x, Y)) * 0.00640869;
|
g1 *= g2;
|
||||||
|
for (int i = 1; i < 3; i++) {
|
||||||
|
sum += texture(tex, vec2(X - i * pixel.x, Y)) * g0;
|
||||||
|
sum += texture(tex, vec2(X + i * pixel.x, Y)) * g0;
|
||||||
|
g0 *= g1;
|
||||||
|
g1 *= g2;
|
||||||
|
}
|
||||||
|
|
||||||
FragColor = sum;
|
FragColor = sum;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
uniform sampler2D tex;
|
uniform sampler2D tex;
|
||||||
uniform vec2 pixel;
|
uniform vec2 pixel;
|
||||||
|
|
||||||
|
float sigma = 1.;
|
||||||
|
|
||||||
// Gaussian separated blur with radius 6.
|
// Gaussian separated blur with radius 6.
|
||||||
|
|
||||||
out vec4 FragColor;
|
out vec4 FragColor;
|
||||||
@ -8,17 +10,22 @@ out vec4 FragColor;
|
|||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec2 uv = gl_FragCoord.xy * pixel;
|
vec2 uv = gl_FragCoord.xy * pixel;
|
||||||
vec4 sum = vec4(0.0);
|
|
||||||
float X = uv.x;
|
float X = uv.x;
|
||||||
float Y = uv.y;
|
float Y = uv.y;
|
||||||
|
|
||||||
sum += texture(tex, vec2(X, Y - 5.13333 * pixel.y)) * 0.00640869;
|
float g0, g1, g2;
|
||||||
sum += texture(tex, vec2(X, Y - 3.26667 * pixel.y)) * 0.083313;
|
g0 = 1.0 / (sqrt(2.0 * 3.14) * sigma);
|
||||||
sum += texture(tex, vec2(X, Y - 1.4 * pixel.y)) * 0.305481;
|
g1 = exp(-0.5 / (sigma * sigma));
|
||||||
sum += texture(tex, vec2(X, Y)) * 0.209473;
|
g2 = g1 * g1;
|
||||||
sum += texture(tex, vec2(X, Y + 1.4 * pixel.y)) * 0.305481;
|
vec4 sum = texture(tex, vec2(X, Y)) * g0;
|
||||||
sum += texture(tex, vec2(X, Y + 3.26667 * pixel.y)) * 0.083313;
|
g0 *= g1;
|
||||||
sum += texture(tex, vec2(X, Y + 5.13333 * pixel.y)) * 0.00640869;
|
g1 *= g2;
|
||||||
|
for (int i = 1; i < 3; i++) {
|
||||||
|
sum += texture(tex, vec2(X, Y - i * pixel.y)) * g0;
|
||||||
|
sum += texture(tex, vec2(X, Y + i * pixel.y)) * g0;
|
||||||
|
g0 *= g1;
|
||||||
|
g1 *= g2;
|
||||||
|
}
|
||||||
|
|
||||||
FragColor = sum;
|
FragColor = sum;
|
||||||
}
|
}
|
||||||
|
@ -121,6 +121,7 @@ FillInstances_impl(std::vector<std::pair<GLMesh *, scene::ISceneNode *> > Instan
|
|||||||
auto &Tp = InstanceList[i];
|
auto &Tp = InstanceList[i];
|
||||||
scene::ISceneNode *node = Tp.second;
|
scene::ISceneNode *node = Tp.second;
|
||||||
InstanceFiller<T>::add(mesh, node, InstanceBuffer[InstanceBufferOffset++]);
|
InstanceFiller<T>::add(mesh, node, InstanceBuffer[InstanceBufferOffset++]);
|
||||||
|
assert(InstanceBufferOffset * sizeof(T) < 10000 * sizeof(InstanceDataDualTex));
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawElementsIndirectCommand &CurrentCommand = CommandBuffer[CommandBufferOffset++];
|
DrawElementsIndirectCommand &CurrentCommand = CommandBuffer[CommandBufferOffset++];
|
||||||
|
Loading…
Reference in New Issue
Block a user