* Pass perspective distortion parameters as uniforms
* Set all perspective bias parameters via ShadowRenderer
* Recalibrate perspective distortion and shadow range to render less shadow geometry with the same quality and observed shadow distance
The dynamic shadows are yet not in the desired state to justify the
inclusion into version 5.5.0. A stable release is long overdue, hence
this allows fixes to continue in 5.6.0-dev to finally release an
acceptable version of the dynamic shadows feature.
Reverting this commit is highly recommended to proceed in development.
When mods were toggled by double-click, the hard dependencies were no longer enabled automatically.
However, the 'Enabled' checkbox did still work. This commit restores the behaviour as seen before commit c401a06
fixes:
* Switching between games does not immediately hide creative mode / damage buttons if so specified
* World creation menu has a game selection list even though the menu already provides a gamebar
* Showing gameid in world list is unnecessary
* Choice of mapgen parameters in menu persists between games (and was half-broken)
This adds support for disable_settings to game.conf. In this you can specify a list of settings that should not be visible in the "local game" (or however it is called nowadays) tab. Enable Damage, Creative Mode and Host Server are supported.
Co-authored-by: Wuzzy <Wuzzy2@mail.ru>
Co-authored-by: Aaron Suen <warr1024@gmail.com>
Co-authored-by: rubenwardy <rw@rubenwardy.com>
* Add a simple PNG image encoder with Lua API
Add ColorSpec to RGBA converter
Make a safety wrapper for the encoder
Create devtest examples
Co-authored-by: hecktest <>
Co-authored-by: sfan5 <sfan5@live.de>
Reduces stutter and freezes when playing.
* Maintains double SM and SM Color textures
* Light frustum update triggers incremental generation of shadow map into secondary 'future' textures.
* Every incremental update renders a portion of the shadow draw list (split equally).
* After defined number of frames (currently, 4), 'future' and 'current' textures are swapped, and DirectionalLight 'commits' the new frustum to use when rendering shadows on screen.
Co-authored-by: sfan5 <sfan5@live.de>
Add API for mods to hook liquid transformation events
Without this API, there is no reliable way for mods to be
notified when liquid transform modifies nodes and mods are
forced to poll for changes. This allows mods to detect
changes to flowing liquid nodes and liquid renewal using
event-driven logic.
This completely removes any mention of the software and D3D drivers from MT, preventing the user from accidentally attempting to use them. Users who need a software renderer should be asked to install Mesa drivers which offer superior fidelity and performance over the 'burningsvideo' driver.
If enabled in minetest.conf, provides colored, clickable (middle-mouse or ctrl-left-mouse) weblinks in chat output, to open the OS' default web browser.
Writing vectors as strings is very common and should belong to `vector.*`. `minetest.pos_to_string` is also too long to write, implies that one should only use it for positions and leaves no spaces after the commas.
This PR is the second attempt to translate builtin.
Server-sent translation files can be added to `builtin/locale/`, whereas client-side translations depend on gettext.
This only works when shaders are enabled.
The centroid varying avoids that the textures (which repeat themselves out of bounds) are sampled out of bounds in MSAA.
If MSAA (called FSAA in minetest) is disabled, the centroid keyword does nothing.
Add more detailed light detection functions, a function to get the artificial light (torches) and a function to get the sunlight as seen by the player (you can specify timeofday).
Co-authored-by: rubenwardy <rw@rubenwardy.com>
Allows catching a chatcommand call just after the command and the
parameters are parsed but before its existence is checked and before the
corresponding function is run. Returning `true` from a callback function
will prevent default handling of the command leaving mods to handle the
command manually.
Erase all traces of normal "generation" from fragment shaders
Remove the "feature" from the engine and default config
Remove any leftover documentation of it
The default (PC-style) MainMenu works great on Android. Provides access to ContentDB and allows players to create many worlds in a few clicks.
Makes the interface consistent and eliminates player confusion.
Falling nodes that were spawned prior the recent falling node changes did not require param2.
Default to param2 = 0 when none is found in the node data.
package.id is a sanitised combination of author and basename, used to
compare remote and local content. Minetest ignores `_game` when comparing
game names, so package.id has `_game` removed. This meant that the wrong
URL was being generated for View.
* added vector.rotate
* added vector.forward_from_rotation and vector.up_from_rotation
* added vector.forward_up_to_rotatiton
* fixed some bugs and formatting with vector functions
* shortened name of some new vector functions and added documentation
* made vector.rotate not require a unit vector as axis
* fixed crash with vector.forward_up_to_rot
* renamed new vector functions, made vector.rotate apply a rotation matrix, old vector.rotate is now called vector.rotate_around_axis
* documented vector function changes
* removed some whitespace to appease luacheck
* implemented and fixed optimization of vector.rotate_around_axis by SmallJoker
* added some unit tests for rotation vector functions
* clarified that rotation vectors are in radians and according to the left hand rule
* hopefully appeased luacheck
* renamed rotation_to_horizontal to forward_at_rotation, rotation_to_vertical to up_at_rotation
* handled cases where sin or cos are 0 in rotation vector functions
* added more comments
* clarified documentation of rotation vector functions
* added more unit tests
* changed way in which vector.rotate_around_axis is adjusted for left handed coordinate systems
* made vector.rotate_around_axis actually left handed
* unrolled matrix multiplication
* removed vector.forward_at_rotation and vector.up_at_rotation
* prettified vector.rotate_around_axis, made previous commits not break anything
* removed references to removed vector.forward_at_rotation and vector.up_at_rotation
* removed documentation of removed vector functions
* clarified documentation and fixed styling of rotation vector functions
* restyled comments minorly
* spelling fixes and some hopefully better comments
* allowed 'up' to be missing from vector.directions_to_rotation and removed requirement for unit vectors as arguments
* made vector.rotate_around_axis() right handed again for consistency
* documented previous changes
* made matrix multiplication actually multiply
* renamed vector.directions_to_rotation() to vector.dir_to_rotation()
* optimized a distance comparison
* Fixed potential false positive in unit tests.
Co-authored-by: NetherEran <nethereran@hotmail.com>
Replace on_auth_fail callback with more versatile on_authplayer
Better clarify account login process in Lua API documentation
Change initial timestamp for newly registered accounts to -1
Fix incorrect value of 'mgv7_floatland_density'.
Use correct spelling of 'persistence'.
Move '3d_paralax_strength' into correct section (3D mode).
Refer to 'active_object_send_range_blocks' instead of non-existent 'active_object_range'.
Floatland structure is vertically-compressed 3D noise.
Uses a lacunarity of 1.618 (the golden ratio) for high quality
noise.
Floatlands appear between user-settable Y limits, with smooth
tapering at each limit.
Simple user-settable density adjustment.
Shadow propagation is disabled in and just below floatlands, no
shadows are cast on the world surface.
Can be reconfigured to create a solid upper world layer between
the Y limits, lakes/seas can be optionally added to this.
This adds support for optional “off state” icons for statbars. “off state icons” can be used to denote the lack of something, like missing hearts or bubbles.
Add "off state" textures to the builtin statbars.
Co-authored-by: SmallJoker <mk939@ymail.com>
PLAYER_MAX_BREATH_DEFAULT was earlier set to 11, so that 10 bubbles are shown before the breath bar disappears.
Now, PLAYER_MAX_BREATH_DEFAULT is set to 10, and the breath_bar scaling code in builtin has been tweaked to show all 10 bubbles before hiding the breath_bar
* minetest.serialize: Reversible number to string conversion
The %a format is not supported in Lua 5.1.
This commit also adds two tests for number serialization.
This will likely be more intuitive for users and should play better
with sandboxed distributions such as Flatpak.
In addition, the screenshot directory will now be created if it doesn't
exist already.
The game.conf has a disallowed_mapgens option. However, some games
require a certain mapgen to be used, like the CTF plugin. This change
adds an option to specify allowed mapgens so that the setting can be
specified in a way that needn't be updated as map generators are added
to Minetest.
Camera's near-plane will be hard-coded to 0.1 on all non-Android platforms. The upper-bound of this setting has been reduced to 0.25, as 0.5 is just way too high.
* Fix pathfinder fail when startpos is over air
* Note down pathfinder restrictions
* Implement real A* search
* Pathfinder: Implement buildPath non-recursively
* Update find_path documentation
* Pathfinder: Check if jump path is unobstructed
* Pathfinder: Fix drop check first checking upwards
* Pathfinder: Return nil if source or dest are solid
* Pathfinder: Use priority queue for open list
Low-disruption first step towards removing the hardcoded cave liquid
code. Since MT 5.0.0 cave liquids can be defined and located by
biome definitions instead.
In games that do not yet use biome definitions to define and locate
cave liquids (MTGame does), lava will now appear below
y = water_level - 256 instead of below 'lava depth' (usually y = -256).
Therefore no change in most mapgens if using the default 'lava depth'.
Previously, the only way to disable the 3D noise tunnels was to set
'cave width' > 1.0, however doing so did not disable the very intensive
noise calculations or the generation loop.
All the other types of cave generation (randomwalk caves, caverns)
can already be independently and completely disabled.
This feature is now needed more because the small randomwalk caves are
now available for use as an alternative to the 3D noise tunnels.
Add mapgen parameters to set the range of the random number of
randomwalk caves per mapchunk, and to set the proportion that are
flooded with liquids.
Default values are, for now, unchanged from the previous hardcoded
values.
Add parameters to allow small randomwalk caves
Disabled by default for now as they have never been present in the
non-mgv6 mapgens.
Revert gamma upper limit to 3.0 because that was raised based on
a misunderstanding and had no benefit. A sane upper limit is
needed as players on a competitive server tend to use the maximum.
Set gamma lower limit to 0.33 for consistency with 3.0.
Set sane limits on alpha, beta, boost and enforce these in code
to limit values entered in minetest.conf and to avoid easy cheating
by editing settingtypes.txt.
Improve documentation and 'readable' setting names.
Clarify that gamma does not significantly affect natural night light.
light.cpp: Various codestyle and comment improvements.
All on_* hooks that return an itemstack are NOT guaranteed to
modify and return the original stack. We cannot count on the
behavior of the existing builtin definitions not to be overridden
by game/mod logic.
Previously, the 'rivers' checkbox was missing for mgcarpathian, caused by the 'possible flags' order: 'caverns,nocaverns,rivers,norivers'.
Also reorder mgcarpathian 'possible flags', but only for consistency.
The setting now accepts values between 1 and 8 in the
Advanced Settings menu.
Values 0 and 1 now behave the same way (setting it to 1 won't
disable MSAA anymore), so there's no need to expose 0 as a value.
This closes#8939.
Before opening the file for writing, its file size is tested. If it exceeds 50 MB, it is moved to debut.txt.1, otherwise the log is appended to the old messages. An old debut.txt.1 is removed if it already exists.
Improve 'readable' setting names for waving water settings.
Change 'near plane' to 'near clipping plane'.
Document physics settings.
mgv6_spflags:
Change 'new biome system' to 'snowbiomes flag' for clarity.
Add missing 'noflat' flag to default flags.
Document new meaning of immortal=1 for players
Disable breathing if player is immortal
Hide builtin statbars if player immortal (delayed)
Co-authored-by: ClobberXD <ClobberXD@gmail.com>