aboutsummaryrefslogtreecommitdiff
path: root/client/shaders
Commit message (Collapse)AuthorAge
* Optimize bumpmapping mathematicsLoic Blot2015-01-16
| | | | | | OpenGL_vertex: * bufferize a duplicate calcul * Factorize vertexes
* Revert "Optimize bumpmapping mathematics"Craig Robbins2015-01-16
| | | | This reverts commit 148fffb0f23fa437c67639ff3cc69177fb71d76a.
* Optimize bumpmapping mathematicsLoic Blot2015-01-15
| | | | | | OpenGL_vertex: * bufferize a duplicate calcul * Factorize vertexes
* Restore finalColorBlend implementation in shaders.RealBadAngel2014-12-07
|
* Let lighting be done only CPU side. Remove finalColorBlend implementation ↵RealBadAngel2014-08-16
| | | | from shaders.
* Make faces shading correct for all possible modes.RealBadAngel2014-08-14
| | | | | Skip shading for lightsources and top of the nodes. Fixes liquid sources and flowing surfaces having different brightness.
* Faces shading fixesRealBadAngel2014-07-07
|
* Improved faces shading with and without shaders.RealBadAngel2014-06-17
|
* Unite nodes shaders.RealBadAngel2014-06-15
| | | | | | | Pass drawtype and material type to shaders. Move shaders generation to startup only. Allow assign shaders per tile. Initial code to support water surface shader.
* Fix invalid liquid lighting.RealBadAngel2014-04-16
|
* Normal maps generation on the fly.RealBadAngel2014-03-21
| | | | | Parallax mapping with slope information. Overriding normal maps.
* Optimize shaders code. Add settings at compile time.RealBadAngel2013-12-09
|
* Fix shaders on some GPUsNovatux2013-12-08
|
* Shaders rework.RealBadAngel2013-12-03
|
* Fix texture bumpmapping on some GPUsZeg92013-08-04
|
* Add texture bumpmapping feature.RealBadAngel2013-07-04
|
* Actually fix shader3 alpha this timekwolekr2013-04-27
|
* Transform alpha channel as well in shaderkwolekr2013-04-25
|
* Add option to use texture alpha channelkwolekr2013-04-23
|
* Fix new_style_waterPilzAdam2013-03-17
|
* Tweak shader randomly a bitPerttu Ahola2012-12-02
|
* Handle day-night transition in shader and make light sources brighter when ↵Perttu Ahola2012-12-02
| | | | shaders are used
* Remove accidental vim swap filePerttu Ahola2012-12-02
|
* Implement a global shader parameter passing system and useful shadersPerttu Ahola2012-12-02
|
* ShaderSource and silly example shadersKahrl2012-12-02
backs(6, RUN_CALLBACKS_MODE_OR); return lua_toboolean(L, -1); } s16 ScriptApiPlayer::on_player_hpchange(ServerActiveObject *player, s16 hp_change) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); // Get core.registered_on_player_hpchange lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_player_hpchange"); lua_remove(L, -2); objectrefGetOrCreate(L, player); lua_pushnumber(L, hp_change); PCALL_RES(lua_pcall(L, 2, 1, error_handler)); hp_change = lua_tointeger(L, -1); lua_pop(L, 2); // Pop result and error handler return hp_change; } bool ScriptApiPlayer::on_respawnplayer(ServerActiveObject *player) { SCRIPTAPI_PRECHECKHEADER // Get core.registered_on_respawnplayers lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_respawnplayers"); // Call callbacks objectrefGetOrCreate(L, player); runCallbacks(1, RUN_CALLBACKS_MODE_OR); bool positioning_handled_by_some = lua_toboolean(L, -1); return positioning_handled_by_some; } bool ScriptApiPlayer::on_prejoinplayer( const std::string &name, const std::string &ip, std::string *reason) { SCRIPTAPI_PRECHECKHEADER // Get core.registered_on_prejoinplayers lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_prejoinplayers"); lua_pushstring(L, name.c_str()); lua_pushstring(L, ip.c_str()); runCallbacks(2, RUN_CALLBACKS_MODE_OR); if (lua_isstring(L, -1)) { reason->assign(lua_tostring(L, -1)); return true; } return false; } void ScriptApiPlayer::on_joinplayer(ServerActiveObject *player) { SCRIPTAPI_PRECHECKHEADER // Get core.registered_on_joinplayers lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_joinplayers"); // Call callbacks objectrefGetOrCreate(L, player); runCallbacks(1, RUN_CALLBACKS_MODE_FIRST); } void ScriptApiPlayer::on_leaveplayer(ServerActiveObject *player, bool timeout) { SCRIPTAPI_PRECHECKHEADER // Get core.registered_on_leaveplayers lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_leaveplayers"); // Call callbacks objectrefGetOrCreate(L, player); lua_pushboolean(L, timeout); runCallbacks(2, RUN_CALLBACKS_MODE_FIRST); } void ScriptApiPlayer::on_cheat(ServerActiveObject *player, const std::string &cheat_type) { SCRIPTAPI_PRECHECKHEADER // Get core.registered_on_cheats lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_cheats"); // Call callbacks objectrefGetOrCreate(L, player); lua_newtable(L); lua_pushlstring(L, cheat_type.c_str(), cheat_type.size()); lua_setfield(L, -2, "type"); runCallbacks(2, RUN_CALLBACKS_MODE_FIRST); } void ScriptApiPlayer::on_playerReceiveFields(ServerActiveObject *player, const std::string &formname, const StringMap &fields) { SCRIPTAPI_PRECHECKHEADER // Get core.registered_on_chat_messages lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_player_receive_fields"); // Call callbacks // param 1 objectrefGetOrCreate(L, player); // param 2 lua_pushstring(L, formname.c_str()); // param 3 lua_newtable(L); StringMap::const_iterator it; for (it = fields.begin(); it != fields.end(); ++it) { const std::string &name = it->first; const std::string &value = it->second; lua_pushstring(L, name.c_str()); lua_pushlstring(L, value.c_str(), value.size()); lua_settable(L, -3); } runCallbacks(3, RUN_CALLBACKS_MODE_OR_SC); } ScriptApiPlayer::~ScriptApiPlayer() { }