aboutsummaryrefslogtreecommitdiff
path: root/src/mapblock_mesh.cpp
AgeCommit message (Collapse)Author
2018-11-28Move client-specific files to 'src/client' (#7902)Quentin Bazin
Update Android.mk Remove 'src/client' from include_directories
2018-08-08Some minor Fastface optimizations. (#7628)lhofhansl
2018-03-22Update mesh collector and move it to a separate file (#6904)Vitaliy
* Update MeshCollector * Simplify MeshCollector
2018-03-17Fix node-nodebox lighting difference in direct sunlight (#7061)Vitaliy
2018-03-03Cleanup in flat lighting (#7051)Vitaliy
2018-02-10Node definition manager refactor (#7016)Dániel Juhász
* Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
2018-01-12Fix ambient occlusion and dark lines at mapblock bordersnumber Zero
2017-10-15Real global textures (#6105)Vitaliy
* Real global textures * Add world-aligned textures * Update minimal to support world-aligned tiles * Update minimal
2017-10-10Smooth lighting: Fix light leaking through edge-connected cornersDTA7
For solid nodes, the lighting at a corner becomes face-dependent, which means that only the four nodes in face-direction contribute to the lighting (getSmoothLightSolid). For special nodes, which use the lighting values at the eight corners of a node, the lighting is not face-dependent, but certain nodes of the eight surrounding nodes of a corner (here indices 4, 5, 6 and 7) can be obstructed. Ambient occlusion now also occurs for solid nodes, if two, three or four of the four nodes in face-direction are solid.
2017-08-28mapblock_mesh.cpp: Fix code style and simplify a bit code (#4558)you
* mapblock_mesh.cpp: Fix code style and simplify a bit code
2017-08-28Use crack animation on all tile layers (#6104)Dániel Juhász
2017-08-20Modernize code: very last fixes (#6290)Loïc Blot
Last modernization fixes
2017-08-19Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)Loïc Blot
* Code modernization: src/p*, src/q*, src/r*, src/s* (partial) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Spelling: vertice -> vertex
2017-08-19Code modernization: src/m* (part 2)Loic Blot
* empty function * default constructor/destructor * remove unused Map::emergeSector(a,b) * for range-based loops * migrate a dirs[7] table to direction tables * remove various old unused function
2017-08-18Optimize headers (part 2) (#6272)Loïc Blot
* Optimize headers (part 2) * less debug.h in headers * less remoteplayer.h for everybody * Cleanup (part 2) * camera.h: mesh.h * mapgen.h: mapnode.h * serverenvironment.h: mapblock.h * nodedef.h: shader.h
2017-08-16Cleanup various headers to reduce compilation times (#6255)Loïc Blot
* Cleanup various headers to reduce compilation times
2017-07-26TileLayer: use shared_ptr for FrameSpec vector (#6171)Loïc Blot
* TileLayer: use shared_ptr for vector framespec This reduce memory copy of TileLayer from (4 to 16) * FrameSpec where FrameSpec = (sizeof(int) + 3 * sizeof(ptr)) to int + sizeof(ptr) Callgrind difference Before: https://lut.im/RGkiJqQb8T/LeQIEXpAuRzfl7gd.png After: https://lut.im/bcqmwee1xu/cTwtptY5tRuS9lp0.png * Fix one push_back to use vector::emplace_back & optimize inclusions
2017-07-26VoxelManip cleanups (const ref, const move) + function removal (#6169)Loïc Blot
* VoxelManip cleanups (const ref, const move) permitting to improve a little bit performance * VoxelArea: precalculate extent (performance enhancement) This permits to reduce extend high cost to zero and drop many v3s16 object creation/removal to calculate extent It rebalance the client thread update to updateFastFaceRow instead of MapBlockMesh generation This will also benefits to mapgen
2017-06-26Isolate irrlicht references and use a singleton (#6041)Loïc Blot
* Add Device3D class which will contain IrrlichtDevice interface move getSupportedVideoDrivers to Device3D Add Device3D singleton & use it in various places Rename Device3D to Rendering engine & add helper functions to various device pointers More singleton work RenderingEngine owns draw_load_screen move draw functions to RenderingEngine Reduce IrrlichtDevice exposure and guienvironment RenderingEngine: Expose get_timer_time() to remove device from guiEngine Make irrlichtdevice & scene manager less exposed * Code style fixes * Move porting::getVideoDriverName, getVideoDriverFriendlyName, getDisplayDensity, getDisplaySize to RenderingEngine Fix XORG_USED macro -> RenderingEngine + create_engine_device from RenderingEngine constructor directly * enum paralax => enum parallax
2017-06-17Cpp11 initializers 2 (#5999)Loïc Blot
* C++11 patchset 10: continue cleanup on constructors * Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop) * More classes cleanup * More classes cleanup + change NULL tests to boolean tests
2017-06-11Use thread_local instead from some static settings (#5955)Loïc Blot
thread_local permits to limit variable lifetime to thread duration. Use it on each setting place which uses static to cache variable result only for thread lifetime. This permits to keep the same performance level & reconfigure server from MT gui in those various variables places. Add thread_local to undersampling calculation too.
2017-04-29Optimize updateFastFaceRow processing by removing some TileSpec copy (#5678)Loïc Blot
* Optimize updateFastFaceRow processing by removing some TileSpec copy It permit to decrease this function from 54% runtime to 45% and reduce copy from 14% runtime to 12.5% getTileInfo also reduced from 27% to 23% * makeFastFace should use a const ref too this trigger a const pointer need in the underlying function Also fix some code style and prevent calculating 4 times the same position at a point * Reduce a comparison cost for lights in updateFastFaceRow
2017-04-21Soft node overlay (#5186)Dániel Juhász
This commit adds node overlays, which are tiles that are drawn on top of other tiles.
2017-04-17MeshUpdateQueue: Add a MapBlock cache that minimizes the amount of MapBlock ↵Perttu Ahola
copying done in the main thread Cache size is configurable by the meshgen_block_cache_size (default 20 MB). New profiler stats: - MeshUpdateQueue MapBlock cache hit % - MeshUpdateQueue MapBlock cache size kB Removes one type of stutter that was seen on the client when received MapBlocks were being handled. (the "MeshMakeData::fill" stutter) Kind of related to at least #5239 Originally preceded by these commits, now includes them: - Move the mesh generator thread into src/mesh_generator_thread.{cpp,h} - mesh_generator_thread.cpp: Update code style - MeshUpdateThread: Modify interface to house a different implementation: Actual functionality will be changed by next commits. - MeshMakeData: Add fillBlockData() interface (so that caller can fill in stuff from eg. a MapBlock cache)
2017-03-22Some performance optimizations (#5424)Loïc Blot
* Some performance optimizations This is globally removing some memory useless copy * use a const ref return on std::string Settings::get to prevent data copy on getters which doesn't need to copy it * pass some stack created strings to static const as they are not modified anywhere * Camera: return nametags per const ref instead of a list pointer, we only need to read it * INodeDefManager: getAll should be a result ref writer instead of a return copy * INodeDefManager: getAlias should return a const std::string ref * Minimap: unroll a Scolor creation in blitMinimapPixersToImageRadar to prvent many variable construct/destruct which are unneeded (we rewrite the content in the loop) * CNodeDefManager::updateAliases: prevent a idef getall copy * Profiler: constness * rollback_interface: create real_name later, and use const ref * MapBlockMesh updateFastFaceRow: unroll TileSpec next_tile, which has a cost of 1.8% CPU due to variable allocation/destruction, * MapBlockMesh updateFastFaceRow: copy next_tile to tile only if it's a different tilespec * MapBlockMesh updateFastFaceRow: use memcpy to copy next_lights to lights to do it in a single cpu operation
2017-03-20Content_mapblock.cpp: Refactornumber Zero
2017-01-30Use fabs() instead of abs() (#5141)Dániel Juhász
2017-01-27Fix after hardware node coloring (#5114)Dániel Juhász
2017-01-24Add smooth lighting for all nodesnumber Zero
Note: Smooth lighting disables the mesh cache.
2017-01-23Add hardware node coloring. Includes:Dániel Juhász
- Increase ContentFeatures serialization version - Color property and palettes for nodes - paramtype2 = "color", "colored facedir" or "colored wallmounted"
2017-01-09Environment & IGameDef code refactoring (#4985)Ner'zhul
* Environment code refactoring * Cleanup includes & class declarations in client & server environment to improve build speed * ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts. * Cleanup IGameDef * Move ITextureSource* IGameDef::getTextureSource() to Client only. * Also move ITextureSource *IGameDef::tsrc() helper * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call * drop unused emerge() call * cleanup server unused functions (mentionned before) * Drop one unused parameter from ContentFeatures::updateTextures * move checkLocalPrivilege to Client * Remove some unnecessary casts * create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it * Fix some comments * Change required IGameDef to Server/Client pointers * Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects * Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu * drop ClientMap::sectorWasDrawn which is unused
2017-01-02Move TileAnimation code to seperate filesfan5
2016-10-06use unordered containers where possible (patch 4 on X)Loic Blot
Also remove some unused parameters/functions
2016-08-18Mapblock mesh: Fix updateFastFaceRow tiling issueobneq
Increase maximum length of tiled node rows from 2 to mapblock size.
2016-02-26Mapblock mesh: Allow to use VBORealBadAngel
2016-02-21Dont make fastface if tile is not seamlessRealBadAngel
Fixes #3378 Closes #3751
2016-02-16Mapblock mesh: Eliminate meshgen lagsRealBadAngel
2016-02-15Use vertices with tangents only when its needed.RealBadAngel
2016-02-08Cleanup selection mesh code, add shaders for halo and selection boxesRealBadAngel
2016-02-07Use tangent space meshes only when shaders are enabledRealBadAngel
2015-08-25Change i++ to ++iDavid Jones
2015-07-27Fixed minimap memory leakBřetislav Štec
2015-07-16Fix relief mapping issuesRealBadAngel
2015-07-08Clean-up Minimap codekwolekr
- Fixed race conditions - Fixed null dereference - Fixed out-of-bounds array access - MinimapMapblock is now allocated and added to update queue only when enabled - Removed dependency on LocalPlayer - Fixed code style - Simplified expressions and program logic - Cleaned minimap object interfaces
2015-06-27Add minimap featureRealBadAngel
2015-06-14Automated whitespace error fix for last commitest31
2015-06-14Improved parallax mapping. Generate heightmaps on the fly.RealBadAngel
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
2015-03-31Move texture_min_size even further down the pipe. Now, textures are ↵Aaron Suen
JIT-upscaled using an image transformation, right at the time they're added to a mesh or particle; images used in 2D elements are left unscaled. This should fix any remaining issues with HUD elements.
2015-02-23Optimise MapBlockMesh related functionsgregorycu
Directely or indirectly optimises the following functions: * MapBlockMesh::MapBlockMesh * MapBlockMesh::getTileInfo * MapBlockMesh::makeFastFace * MapBlockMesh::getSmoothLightCombined