Merge remote-tracking branch 'origin/master' into konstin-m_random_gp
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 |
@ -58,10 +58,10 @@ void apply_instance(const T *Shader, const std::tuple<TupleType...> &arg)
|
||||
unroll_args_instance<std::tuple_size<std::tuple<TupleType...> >::value >::template exec<T>(Shader, arg);
|
||||
}
|
||||
|
||||
template<typename T, enum E_VERTEX_TYPE VertexType, typename... TupleType>
|
||||
void renderMeshes1stPass(const T *Shader, const std::vector<GLuint> &TexUnits, std::vector<std::tuple<TupleType...> > &meshes)
|
||||
template<typename Shader, enum E_VERTEX_TYPE VertexType, typename... TupleType>
|
||||
void renderMeshes1stPass(const std::vector<GLuint> &TexUnits, std::vector<std::tuple<TupleType...> > &meshes)
|
||||
{
|
||||
glUseProgram(Shader->Program);
|
||||
glUseProgram(Shader::getInstance()->Program);
|
||||
glBindVertexArray(getVAO(VertexType));
|
||||
for (unsigned i = 0; i < meshes.size(); i++)
|
||||
{
|
||||
@ -80,7 +80,7 @@ void renderMeshes1stPass(const T *Shader, const std::vector<GLuint> &TexUnits, s
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
apply_instance(Shader, meshes[i]);
|
||||
apply_instance(Shader::getInstance(), meshes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -109,11 +109,11 @@ void IrrDriver::renderSolidFirstPass()
|
||||
|
||||
{
|
||||
ScopedGPUTimer Timer(getGPUTimer(Q_SOLID_PASS1));
|
||||
renderMeshes1stPass<MeshShader::ObjectPass1Shader, video::EVT_STANDARD>(MeshShader::ObjectPass1ShaderInstance, { MeshShader::ObjectPass1ShaderInstance->TU_tex }, ListDefaultStandardG::Arguments);
|
||||
renderMeshes1stPass<MeshShader::ObjectPass1Shader, video::EVT_2TCOORDS>(MeshShader::ObjectPass1ShaderInstance, { MeshShader::ObjectPass1ShaderInstance->TU_tex }, ListDefault2TCoordG::Arguments);
|
||||
renderMeshes1stPass<MeshShader::ObjectRefPass1Shader, video::EVT_STANDARD>(MeshShader::ObjectRefPass1ShaderInstance, { MeshShader::ObjectRefPass1ShaderInstance->TU_tex }, ListAlphaRefG::Arguments);
|
||||
renderMeshes1stPass<MeshShader::NormalMapShader, video::EVT_TANGENTS>(MeshShader::NormalMapShaderInstance, { MeshShader::NormalMapShaderInstance->TU_glossy, MeshShader::NormalMapShaderInstance->TU_normalmap }, ListNormalG::Arguments);
|
||||
renderMeshes1stPass<MeshShader::GrassPass1Shader, video::EVT_STANDARD>(MeshShader::GrassPass1ShaderInstance, { MeshShader::GrassPass1ShaderInstance->TU_tex }, ListGrassG::Arguments);
|
||||
renderMeshes1stPass<MeshShader::ObjectPass1Shader, video::EVT_STANDARD>({ MeshShader::ObjectPass1Shader::getInstance<MeshShader::ObjectPass1Shader>()->TU_tex }, ListDefaultStandardG::Arguments);
|
||||
renderMeshes1stPass<MeshShader::ObjectPass1Shader, video::EVT_2TCOORDS>({ MeshShader::ObjectPass1Shader::getInstance<MeshShader::ObjectPass1Shader>()->TU_tex }, ListDefault2TCoordG::Arguments);
|
||||
renderMeshes1stPass<MeshShader::ObjectRefPass1Shader, video::EVT_STANDARD>({ MeshShader::ObjectRefPass1Shader::getInstance<MeshShader::ObjectRefPass1Shader>()->TU_tex }, ListAlphaRefG::Arguments);
|
||||
renderMeshes1stPass<MeshShader::NormalMapShader, video::EVT_TANGENTS>({ MeshShader::NormalMapShader::getInstance<MeshShader::NormalMapShader>()->TU_glossy, MeshShader::NormalMapShader::getInstance<MeshShader::NormalMapShader>()->TU_normalmap }, ListNormalG::Arguments);
|
||||
renderMeshes1stPass<MeshShader::GrassPass1Shader, video::EVT_STANDARD>({ MeshShader::GrassPass1Shader::getInstance<MeshShader::GrassPass1Shader>()->TU_tex }, ListGrassG::Arguments);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -325,9 +325,6 @@ void Shaders::loadShaders()
|
||||
FullScreenShader::MLAABlendWeightSHader::init();
|
||||
FullScreenShader::MLAAGatherSHader::init();
|
||||
MeshShader::ColorizeShader::init();
|
||||
MeshShader::NormalMapShaderInstance = new MeshShader::NormalMapShader();
|
||||
MeshShader::ObjectPass1ShaderInstance = new MeshShader::ObjectPass1Shader();
|
||||
MeshShader::ObjectRefPass1ShaderInstance = new MeshShader::ObjectRefPass1Shader();
|
||||
MeshShader::InstancedObjectPass1ShaderInstance = new MeshShader::InstancedObjectPass1Shader();
|
||||
MeshShader::InstancedObjectRefPass1ShaderInstance = new MeshShader::InstancedObjectRefPass1Shader();
|
||||
MeshShader::InstancedGrassPass1ShaderInstance = new MeshShader::InstancedGrassPass1Shader();
|
||||
@ -340,7 +337,6 @@ void Shaders::loadShaders()
|
||||
MeshShader::ObjectUnlitShaderInstance = new MeshShader::ObjectUnlitShader();
|
||||
MeshShader::SphereMapShaderInstance = new MeshShader::SphereMapShader();
|
||||
MeshShader::SplattingShaderInstance = new MeshShader::SplattingShader();
|
||||
MeshShader::GrassPass1ShaderInstance = new MeshShader::GrassPass1Shader();
|
||||
MeshShader::GrassPass2ShaderInstance = new MeshShader::GrassPass2Shader();
|
||||
MeshShader::BubbleShader::init();
|
||||
MeshShader::TransparentShaderInstance = new MeshShader::TransparentShader();
|
||||
@ -504,7 +500,6 @@ namespace MeshShader
|
||||
TU_tex = 0;
|
||||
AssignTextureUnit(Program, { { TU_tex, "tex" } });
|
||||
}
|
||||
ObjectPass1Shader *ObjectPass1ShaderInstance;
|
||||
|
||||
ObjectRefPass1Shader::ObjectRefPass1Shader()
|
||||
{
|
||||
@ -521,7 +516,6 @@ namespace MeshShader
|
||||
TU_tex = 0;
|
||||
AssignTextureUnit(Program, { { TU_tex, "tex" } });
|
||||
}
|
||||
ObjectRefPass1Shader *ObjectRefPass1ShaderInstance;
|
||||
|
||||
GrassPass1Shader::GrassPass1Shader()
|
||||
{
|
||||
@ -534,8 +528,6 @@ namespace MeshShader
|
||||
AssignTextureUnit(Program, { { TU_tex, "tex" } });
|
||||
}
|
||||
|
||||
GrassPass1Shader *GrassPass1ShaderInstance;
|
||||
|
||||
NormalMapShader::NormalMapShader()
|
||||
{
|
||||
Program = LoadProgram(
|
||||
@ -552,7 +544,6 @@ namespace MeshShader
|
||||
TU_glossy = 0;
|
||||
AssignTextureUnit(Program, { { TU_normalmap, "normalMap" }, { TU_glossy, "DiffuseForAlpha" } });
|
||||
}
|
||||
NormalMapShader *NormalMapShaderInstance;
|
||||
|
||||
InstancedObjectPass1Shader::InstancedObjectPass1Shader()
|
||||
{
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <IMeshSceneNode.h>
|
||||
#include <vector>
|
||||
#include "config/user_config.hpp"
|
||||
#include "utils/singleton.hpp"
|
||||
|
||||
typedef unsigned int GLuint;
|
||||
using namespace irr;
|
||||
@ -119,28 +120,40 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, typename... Args>
|
||||
class ShaderHelperSingleton : public Singleton<T>
|
||||
{
|
||||
protected:
|
||||
std::vector<GLuint> uniforms;
|
||||
public:
|
||||
friend class Singleton<class ObjectPass1Shader>;
|
||||
GLuint Program;
|
||||
|
||||
void setUniforms(const Args & ... args) const
|
||||
{
|
||||
if (UserConfigParams::m_ubo_disabled)
|
||||
bypassUBO(Program);
|
||||
UniformHelper::setUniformsHelper(uniforms, args...);
|
||||
}
|
||||
};
|
||||
|
||||
namespace MeshShader
|
||||
{
|
||||
class ObjectPass1Shader : public ShaderHelper<core::matrix4, core::matrix4>
|
||||
class ObjectPass1Shader : public ShaderHelperSingleton<ObjectPass1Shader, core::matrix4, core::matrix4>
|
||||
{
|
||||
public:
|
||||
GLuint TU_tex;
|
||||
ObjectPass1Shader();
|
||||
};
|
||||
|
||||
extern ObjectPass1Shader *ObjectPass1ShaderInstance;
|
||||
|
||||
|
||||
class ObjectRefPass1Shader : public ShaderHelper<core::matrix4, core::matrix4, core::matrix4>
|
||||
class ObjectRefPass1Shader : public ShaderHelperSingleton<ObjectRefPass1Shader, core::matrix4, core::matrix4, core::matrix4>
|
||||
{
|
||||
public:
|
||||
GLuint TU_tex;
|
||||
ObjectRefPass1Shader();
|
||||
};
|
||||
|
||||
extern ObjectRefPass1Shader *ObjectRefPass1ShaderInstance;
|
||||
|
||||
class GrassPass1Shader : public ShaderHelper<core::matrix4, core::matrix4, core::vector3df>
|
||||
class GrassPass1Shader : public ShaderHelperSingleton<GrassPass1Shader, core::matrix4, core::matrix4, core::vector3df>
|
||||
{
|
||||
public:
|
||||
GLuint TU_tex;
|
||||
@ -148,17 +161,13 @@ public:
|
||||
GrassPass1Shader();
|
||||
};
|
||||
|
||||
extern GrassPass1Shader *GrassPass1ShaderInstance;
|
||||
|
||||
class NormalMapShader : public ShaderHelper<core::matrix4, core::matrix4>
|
||||
class NormalMapShader : public ShaderHelperSingleton<NormalMapShader, core::matrix4, core::matrix4>
|
||||
{
|
||||
public:
|
||||
GLuint TU_normalmap, TU_glossy;
|
||||
NormalMapShader();
|
||||
};
|
||||
|
||||
extern NormalMapShader *NormalMapShaderInstance;
|
||||
|
||||
class InstancedObjectPass1Shader : public ShaderHelper<>
|
||||
{
|
||||
public:
|
||||
|
@ -225,7 +225,7 @@ void STKMeshSceneNode::render()
|
||||
glDisable(GL_CULL_FACE);
|
||||
if (update_each_frame)
|
||||
updatevbo();
|
||||
glUseProgram(MeshShader::ObjectPass1ShaderInstance->Program);
|
||||
glUseProgram(MeshShader::ObjectPass1Shader::getInstance()->Program);
|
||||
// Only untextured
|
||||
for (unsigned i = 0; i < GLmeshes.size(); i++)
|
||||
{
|
||||
@ -235,7 +235,7 @@ void STKMeshSceneNode::render()
|
||||
GLenum itype = mesh.IndexType;
|
||||
size_t count = mesh.IndexCount;
|
||||
|
||||
MeshShader::ObjectPass1ShaderInstance->setUniforms(AbsoluteTransformation, invmodel);
|
||||
MeshShader::ObjectPass1Shader::getInstance()->setUniforms(AbsoluteTransformation, invmodel);
|
||||
assert(mesh.vao);
|
||||
glBindVertexArray(mesh.vao);
|
||||
glDrawElements(ptype, count, itype, 0);
|
||||
|
@ -493,7 +493,7 @@ void FeatureUnlockedCutScene::onUpdate(float dt)
|
||||
|
||||
if (m_global_time > GIFT_EXIT_TO)
|
||||
{
|
||||
const irr::video::SColor color2(255, 255, 126, 21);
|
||||
const irr::video::SColor color2(255, 0, 0, 0);
|
||||
const int fontH = GUIEngine::getFontHeight();
|
||||
const int MARGIN = 10;
|
||||
|
||||
|
@ -302,7 +302,7 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
const_cast<KartProperties*>(
|
||||
kart_properties_manager->getKart("tux")
|
||||
),
|
||||
L"Unlocked"
|
||||
L"You unlocked <actual text would go here...>"
|
||||
);
|
||||
scene->addUnlockedTrack(track_manager->getTrack("lighthouse"));
|
||||
StateManager::get()->pushScreen(scene);
|
||||
@ -323,7 +323,7 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
track_manager->getTrack("snowmountain")
|
||||
->getScreenshotFile().c_str()));
|
||||
|
||||
scene->addUnlockedPictures(textures, 4.0, 3.0, L"You did it");
|
||||
scene->addUnlockedPictures(textures, 4.0, 3.0, L"You unlocked <actual text would go here...>");
|
||||
|
||||
StateManager::get()->pushScreen(scene);
|
||||
}
|
||||
|