1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-03 16:30:24 +02:00
Commit Graph

921 Commits

Author SHA1 Message Date
71a56c3552 Fix broken FPS/dtime counters in debug info
was broken by a89afe1229
2022-05-03 20:17:43 +02:00
c7bcebb628 Initialize wield mesh colors when changing item. (#12254)
Fixes #12245
2022-05-01 17:21:00 +02:00
a89afe1229 Deal with compiler warnings 2022-04-30 16:49:41 +02:00
0d91ef78dd Refactor local time getter functions (#12221)
This commit introduces mt_localtime() in src/gettime.h, a wrapper
around the OS-specific thread-safe versions of localtime()
(resp. localtime_s on Windows and localtime_r in other systems).

Per the Open Group recommendation,
«portable applications should call tzset() explicitly before using
ctime_r() or localtime_r() because setting timezone information is
optional for those functions», so we also do a one-shot
call of tzset() (_tzset() on Windows to avoid warning C4996).

The function is used to replace the localtime() calls in
getTimestamp() and makeScreenshot().

(The only reminaing call to localtime() in the tree now is the one in
the local copy of the Lua source code.)
2022-04-28 18:53:33 +02:00
7e18a1f1be Remove HW_buffer_counter after IrrlichtMt fix to remove HWBufferMap (#12232)
Keep code and use version check instead, for backwards compatibility
2022-04-28 18:52:19 +02:00
7f4fc6f8a7 Show unknown node in debug screen (#12230) 2022-04-28 18:51:46 +02:00
b55d7cd45a Fix worldaligned textures
As reported in #12197, b0b9732359
introduces a regression in worldalign textures.

The specific change that seems to be responsible for this issue is the
change in order between the computation of the cuboid texture
coordinates and the box edge correction.

Fix #12197 by moving the box edge correction back to before the cuboid
texture coordinates, as it used to be.
2022-04-24 21:11:24 +02:00
4558793caf Fix some debug info showing despite being disabled in the UI (#12205) 2022-04-21 21:45:47 +02:00
7cea688a1c Fix '[combine' when EVDF_TEXTURE_NPOT is disabled. (#12187)
Stop scaling images to POT immediately when loaded. The 'combine'
modifier hardcodes X and Y coordinates, and so behaves incorrectly
if applied to a scaled image. Images emitted by generateImage()
are already scaled to POT before being used as a texture, so
nothing should break.
2022-04-16 18:50:59 +02:00
1d07a36552 upright_sprite: Fix walk animation in first person (#12194) 2022-04-15 18:55:08 +02:00
a5d29fa1d4 Implement shadow offsets for the new SM distortion function (#12191)
* Move shadow position calculation to vertex shaders
* Animate entire scene before rendering shadows to prevent lagging of shadows
* Remove unnecessary use of PolygonOffsetFactor
* Apply normal offset to both nodes and objects
* Rename getPerspectiveFactor -> applyPerspectiveDistortion
* Remove perspective distortion from fragment shaders
2022-04-14 22:49:30 +02:00
7993909fab Spacing fixes 2022-04-08 14:55:21 +01:00
5683bb76cc Fix compiler warnings 2022-04-08 14:55:21 +01:00
23516acd0b Remove obsolete commented code (follow up to #12166) 2022-04-07 22:38:01 +02:00
48f7c5603e Adjust shadowmap distortion to use entire SM texture (#12166) 2022-04-07 22:13:50 +02:00
0b5b2b2633 Disentangle map implementations (#12148)
Fixes violation of Liskov substitution principle
Fixes #12144
2022-04-07 21:58:04 +02:00
b0b9732359 Add depth sorting for node faces (#11696)
Use BSP tree to order transparent triangles
https://en.wikipedia.org/wiki/Binary_space_partitioning
2022-04-02 10:42:27 +02:00
26c046a563 Increase the ratio between shadow range and viewing range 2022-04-02 10:39:43 +02:00
3dd7d7867b Limit shadow map to the viewing range (#12158) 2022-03-31 22:40:59 +02:00
31578303a4 Tune shadow perspective distortion (#12146)
* 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
2022-03-31 22:40:06 +02:00
0f25fa7af6 Add API to control shadow intensity from the game/mod (#11944)
* Also Disable shadows when sun/moon is hidden. Fixes #11972.
2022-03-26 16:58:26 +01:00
289c3ff377 Fix footsteps for players whose collision box min y != 0 (#12110) 2022-03-14 21:01:18 +01:00
11f3f72f1c Fix undefined behavior in TileLayer (#12125)
Initialize the values properly
2022-03-11 21:22:49 +01:00
51294163bb Use Irrlicht bindings for GL call 2022-03-09 22:37:34 +01:00
4801bdf45a Correct normal bias for entities
Remove use of magic constants.
Apply cameraOffset
Calculate distance projected on SM plane
2022-03-07 23:45:26 +01:00
8f652f4e31 Fix shadows for upright sprite nodes
Avoid using read only materials in mesh scene node, as
it confuses shadow renderer.
2022-03-07 23:45:26 +01:00
d2a3bed240 Avoid possible buffer overflow when checking face normals 2022-03-07 23:45:26 +01:00
e4583cb9b7 Use correct indexes when checking mesh normals 2022-03-07 23:45:26 +01:00
1175f48d05 Detect 'insane' normals in checkMeshNormals.
Detect non-zero normals which point in the opposite direction from the
face plane normal.
2022-03-07 23:45:26 +01:00
54dccc480e Improve lighting of entities.
Pass correct natural & artificial light to the shaders
Use natural/artificial light ratio for correct rendering of shadows
2022-03-07 23:45:26 +01:00
4e39cdef94 Apply shadow texture to wield-based entities
For example, dropped nodes and items.
2022-03-07 23:45:26 +01:00
2bba53b2c3 Render shadows on entities.
Fixes problem with mod 'drawers'.
2022-03-07 23:45:26 +01:00
b9e886726c Readd basic_debug as a HUD flag (#12020) 2022-03-05 22:16:17 +01:00
DS
a8707158a5 Allow to set the displayed item count and its alignment via meta (#8448)
* Allow to set the displayed item count and its offset via meta

* fix rect constr call

* devtest: add dump_item chatcommand

* fix rect2 constr call (sdim is a position (typedef for v2s32), not a dimension) and remove background because it would work now

* add missing utf8 to wide conversion

* rename to count_meta
2022-02-10 06:17:52 -05:00
c61998bd20 Revert "Disable dynamic shadows for the 5.5.0 release" (#12032) 2022-01-31 21:48:14 +00:00
1e4d6672be Fix builtin statbar backgrounds
see #12000
2022-01-31 16:35:30 -05:00
5da204f5bc Get rid of basic_debug last minute
This isn't a revert but rather just disables the codepaths. also see #12011
2022-01-30 21:32:49 +01:00
a27362de6a Disable dynamic shadows for the 5.5.0 release
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.
2022-01-29 18:42:55 -05:00
058846d687 Rework drawtime and related timekeeping code to use microseconds 2022-01-27 22:30:02 +01:00
fc161e757c Automatically migrate client mod storage (#11960) 2022-01-27 22:24:30 +01:00
f8cef52ea0 Fix consistency of sky sun/moon texture behaviour
Also cleans up related code somewhat.
2022-01-22 11:18:34 -05:00
37d80784dd Allow resetting celestial vault elements by leaving its arguments empty (#11922) 2022-01-22 12:42:49 +01:00
f66ed2c27f Fix local animation not instantly updating after being set 2022-01-19 23:30:18 +01:00
b6555ee6af Reset override material in anaglyph
Reset override material properties before applying the color filter.
2022-01-16 13:10:33 +01:00
5eb45e1ea0 Restore pass-through of direction keys (#11924)
This moves relevant code into the PlayerControl class and gets rid of separate keyPressed variable.
2022-01-09 18:46:36 +01:00
76dbd0d2d0 Fully remove bitmap font support (#11863)
Freetype is now a build requirement.
2022-01-08 14:53:25 +01:00
bf22569019 Use a database for mod storage (#11763) 2022-01-07 20:28:49 +02:00
84fdd369d4 Cap damage overlay duration to 1 second (#11871) 2022-01-02 22:14:02 -05:00
e030d9cff0 Recalculate normals before adding mesh to the scene 2022-01-02 14:32:13 +01:00
29d2b2ccd0 Print announce error response (#11878)
Fix HTTPFetch caller and request ID to 64 bits
Check that allocated caller ID is not DISCARD
Print body if serverlist request returns error
Don't print control characters from HTTP responses
Document special HTTPFetch caller IDs
Allow unicode to be printed
2022-01-01 22:44:56 +01:00