aboutsummaryrefslogtreecommitdiff
path: root/client/shaders
Commit message (Expand)AuthorAge
* Simple shader fixes. (#8991)lhofhansl2019-09-26
* Require 'waving = 3' in a nodedef to apply the liquid waving shader (#8418)Paramat2019-03-27
* Shaders: Fix comment line (#7668)xzcx2018-08-30
* Rewrite rendering engine (#6253)Vitaliy2017-10-31
* Shaders: Remove unused water surface shaderparamat2017-05-08
* Fix fog weirdness (#5146)numberZero2017-01-31
* Add hardware node coloring. Includes:Dániel Juhász2017-01-23
* Shaders: Remove unnecessary 'if' statementsLars Hofhansl2016-12-24
* Fog: Make fraction of visible distance at which fog starts configurableLars Hofhansl2016-12-07
* Fix unexplained shader issue (glsl compiler bug??) (#4757)Rogier-52016-11-17
* Remove unused shader matrices. (#4723)lhofhansl2016-11-04
* Shaders: Remove special handling for liquids. (#4670)lhofhansl2016-10-26
* Shaders: Apply tone mapping before fog calculation.Lars Hofhansl2016-10-25
* Shaders: Harmonize Irrlicht and shader fog calculationsLars Hofhansl2016-10-24
* Use range-based fog instead of z-plane based.Lars Hofhansl2016-10-13
* Nodes shader: Decrease amplitude of waving leaves and plantsparamat2016-03-30
* Replace CRLF with LF in shader filesest312016-03-25
* Shaders: fix fog not affecting opaque liquidsRealBadAngel2016-02-23
* Filmic HDR tone mappingRealBadAngel2016-02-09
* Cleanup selection mesh code, add shaders for halo and selection boxesRealBadAngel2016-02-08
* Speed up and make more accurate relief mappingRealBadAngel2015-12-10
* Shaders: use triple-frequency waving for leaves and plantsparamat2015-09-07
* Remove use of engine sent texture tiling flags - theyre no longer neededRealBadAngel2015-08-20
* Add wielded (and CAOs) shaderRealBadAngel2015-07-21
* Fix relief mapping issuesRealBadAngel2015-07-16
* Shaders fixes and cleanup relief mapping code.RealBadAngel2015-07-02
* Bugfix: variable type mismatchRealBadAngel2015-06-28
* Add minimap featureRealBadAngel2015-06-27
* Remove textures vertical offset. Fix for area enabling parallax.RealBadAngel2015-06-21
* Automated whitespace error fix for last commitest312015-06-14
* Improved parallax mapping. Generate heightmaps on the fly.RealBadAngel2015-06-14
* Optimize bumpmapping mathematicsLoic Blot2015-01-16
* Revert "Optimize bumpmapping mathematics"Craig Robbins2015-01-16
* Optimize bumpmapping mathematicsLoic Blot2015-01-15
* Restore finalColorBlend implementation in shaders.RealBadAngel2014-12-07
* Let lighting be done only CPU side. Remove finalColorBlend implementation fro...RealBadAngel2014-08-16
* Make faces shading correct for all possible modes.RealBadAngel2014-08-14
* Faces shading fixesRealBadAngel2014-07-07
* Improved faces shading with and without shaders.RealBadAngel2014-06-17
* Unite nodes shaders.RealBadAngel2014-06-15
* Fix invalid liquid lighting.RealBadAngel2014-04-16
* Normal maps generation on the fly.RealBadAngel2014-03-21
* 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
ation() { removeChildren(); } void GUIConfirmRegistration::removeChildren() { const core::list<gui::IGUIElement *> &children = getChildren(); core::list<gui::IGUIElement *> children_copy; for (gui::IGUIElement *i : children) children_copy.push_back(i); for (gui::IGUIElement *i : children_copy) i->remove(); } void GUIConfirmRegistration::regenerateGui(v2u32 screensize) { acceptInput(); removeChildren(); /* Calculate new sizes and positions */ const float s = m_gui_scale; DesiredRect = core::rect<s32>( screensize.X / 2 - 600 * s / 2, screensize.Y / 2 - 360 * s / 2, screensize.X / 2 + 600 * s / 2, screensize.Y / 2 + 360 * s / 2 ); recalculateAbsolutePosition(false); v2s32 size = DesiredRect.getSize(); v2s32 topleft_client(0, 0); const wchar_t *text; /* Add stuff */ s32 ypos = 30 * s; { core::rect<s32> rect2(0, 0, 540 * s, 180 * s); rect2 += topleft_client + v2s32(30 * s, ypos); static const std::string info_text_template = strgettext( "You are about to join this server with the name \"%s\" for the " "first time.\n" "If you proceed, a new account using your credentials will be " "created on this server.\n" "Please retype your password and click 'Register and Join' to " "confirm account creation, or click 'Cancel' to abort."); char info_text_buf[1024]; porting::mt_snprintf(info_text_buf, sizeof(info_text_buf), info_text_template.c_str(), m_playername.c_str()); wchar_t *info_text_buf_wide = utf8_to_wide_c(info_text_buf); gui::IGUIEditBox *e = new gui::intlGUIEditBox(info_text_buf_wide, true, Environment, this, ID_intotext, rect2, false, true); delete[] info_text_buf_wide; e->drop(); e->setMultiLine(true); e->setWordWrap(true); e->setTextAlignment(gui::EGUIA_UPPERLEFT, gui::EGUIA_CENTER); } ypos += 200 * s; { core::rect<s32> rect2(0, 0, 540 * s, 30 * s); rect2 += topleft_client + v2s32(30 * s, ypos); gui::IGUIEditBox *e = Environment->addEditBox(m_pass_confirm.c_str(), rect2, true, this, ID_confirmPassword); e->setPasswordBox(true); Environment->setFocus(e); } ypos += 50 * s; { core::rect<s32> rect2(0, 0, 230 * s, 35 * s); rect2 = rect2 + v2s32(size.X / 2 - 220 * s, ypos); text = wgettext("Register and Join"); GUIButton::addButton(Environment, rect2, m_tsrc, this, ID_confirm, text); delete[] text; } { core::rect<s32> rect2(0, 0, 120 * s, 35 * s); rect2 = rect2 + v2s32(size.X / 2 + 70 * s, ypos); text = wgettext("Cancel"); GUIButton::addButton(Environment, rect2, m_tsrc, this, ID_cancel, text); delete[] text; } { core::rect<s32> rect2(0, 0, 500 * s, 40 * s); rect2 += topleft_client + v2s32(30 * s, ypos + 40 * s); text = wgettext("Passwords do not match!"); IGUIElement *e = Environment->addStaticText( text, rect2, false, true, this, ID_message); e->setVisible(false); delete[] text; } } void GUIConfirmRegistration::drawMenu() { gui::IGUISkin *skin = Environment->getSkin(); if (!skin) return; video::IVideoDriver *driver = Environment->getVideoDriver(); video::SColor bgcolor(140, 0, 0, 0); driver->draw2DRectangle(bgcolor, AbsoluteRect, &AbsoluteClippingRect); gui::IGUIElement::draw(); #ifdef __ANDROID__ getAndroidUIInput(); #endif } void GUIConfirmRegistration::closeMenu(bool goNext) { if (goNext) { m_client->confirmRegistration(); } else { *m_aborted = true; infostream << "Connect aborted [Escape]" << std::endl; } quitMenu(); } void GUIConfirmRegistration::acceptInput() { gui::IGUIElement *e; e = getElementFromId(ID_confirmPassword); if (e) m_pass_confirm = e->getText(); } bool GUIConfirmRegistration::processInput() { std::wstring m_password_ws = narrow_to_wide(m_password); if (m_password_ws != m_pass_confirm) { gui::IGUIElement *e = getElementFromId(ID_message); if (e) e->setVisible(true); return false; } return true; } bool GUIConfirmRegistration::OnEvent(const SEvent &event) { if (event.EventType == EET_KEY_INPUT_EVENT) { // clang-format off if ((event.KeyInput.Key == KEY_ESCAPE || event.KeyInput.Key == KEY_CANCEL) && event.KeyInput.PressedDown) { closeMenu(false); return true; } // clang-format on if (event.KeyInput.Key == KEY_RETURN && event.KeyInput.PressedDown) { acceptInput(); if (processInput()) closeMenu(true); return true; } } if (event.EventType != EET_GUI_EVENT) return Parent ? Parent->OnEvent(event) : false; if (event.GUIEvent.EventType == gui::EGET_ELEMENT_FOCUS_LOST && isVisible()) { if (!canTakeFocus(event.GUIEvent.Element)) { dstream << "GUIConfirmRegistration: Not allowing focus change." << std::endl; // Returning true disables focus change return true; } } else if (event.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED) { switch (event.GUIEvent.Caller->getID()) { case ID_confirm: acceptInput(); if (processInput()) closeMenu(true); return true; case ID_cancel: closeMenu(false); return true; } } else if (event.GUIEvent.EventType == gui::EGET_EDITBOX_ENTER) { switch (event.GUIEvent.Caller->getID()) { case ID_confirmPassword: acceptInput(); if (processInput()) closeMenu(true); return true; } } return false; } #ifdef __ANDROID__ bool GUIConfirmRegistration::getAndroidUIInput() { if (!hasAndroidUIInput() || m_jni_field_name != "password") return false; std::string text = porting::getInputDialogValue(); gui::IGUIElement *e = getElementFromId(ID_confirmPassword); if (e) e->setText(utf8_to_wide(text).c_str()); m_jni_field_name.clear(); return false; } #endif