1
0
mirror of https://github.com/minetest/minetest.git synced 2025-06-30 23:20:22 +02:00
Commit Graph

114 Commits

Author SHA1 Message Date
bb7f57b095 VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
5280863300 Set VBO hints in more places 2024-02-29 17:20:49 +01:00
9fcd7f2dc0 Fix clang-tidy type promotion errors 2024-02-26 20:47:47 +01:00
5958714309 Tool specific pointing and blocking pointable type (#13992) 2024-01-22 18:27:08 +01:00
a7eaee77ca ContentCAO: Fix threshold of alpha channel textures (#14213)
With disabled shaders, the material EMT_TRANSPARENT_ALPHA_CHANNEL uses the
parameter as an alpha threshold to decide whether to draw the texture.
Thus lowering this limit fixes the issue of vanishing textures below alpha 128.
2024-01-10 19:34:52 +01:00
0d61598d8a Extend bone override capabilities (#12388) 2023-12-20 21:21:53 +01:00
7f9326805c Return texture filter settings to previous state
This partially reverts commit 72ef90885d.

fixes #14007
2023-11-29 21:09:21 +01:00
DS
11ec75c2ad ActiveObjectMgr fixes (#13560) 2023-10-09 17:13:04 +02:00
c3114132d3 Improve readability and infos in verbose log (#13828) 2023-09-22 18:41:10 +02:00
8ebaf753d3 New physics overrides (#11465) 2023-09-15 20:10:08 +02:00
72ef90885d Clean up texture filtering settings (#13683) 2023-08-24 10:50:47 +02:00
6f0d36c41a Fixes and improvements 2023-07-20 22:15:47 +02:00
7473e4cafd Expose all OpenGL filtering modes, use OpenGL names for them
Because of a review comment on the Irrlicht PR by numberZero.
2023-07-20 22:15:47 +02:00
6bf63d4b41 Rename SMaterial::TextureLayer -> SMaterial::TextureLayers
It's not the "texture layer" of the material, but an array of texture layers.
2023-07-20 22:15:47 +02:00
9bef3c136a Split up texture filtering properties of SMaterialLayer into MinFilter and MagFilter
You can	now set	the filter used	when scaling textures down and the filter used when scaling textures up separately.
2023-07-20 22:15:47 +02:00
307e380f30 Refactor the way you set material properties
Instead of using SMaterial::setFlag, you now set them directly on SMaterial or SMaterialLayer.
2023-07-20 22:15:47 +02:00
25ef8f3934 Fix local animations not resetting
Converts `LocalPlayerAnimation` to a scoped enum to prevent such bugs in the future
2023-07-02 12:47:18 +02:00
DS
edcbfa31c9 Sound refactor and improvements (#12764) 2023-06-16 20:15:21 +02:00
8b73743baa Reduce number of recursively included headers
This should improve compilation speed.

Things changed:
* Prefer forward-declarations in headers.
* Move header-includes out of headers if possible.
* Move some functions definitions out of headers.
* Put some member variables into unique_ptrs (see Client).
2023-04-27 18:50:33 +02:00
fc116ec950 Play object footstep sound at feet 2023-04-13 18:12:13 +01:00
1c10988d6a Fix entity visiblity in bright artificial light (#12906) 2022-11-23 22:40:26 +01:00
d1b80b462e Fix typos and en_US/en_GB inconsistency in various files (#12902) 2022-11-09 11:57:19 -05:00
322c8cf270 Reduce exposure of various internals (#12885)
* refactoring(StaticObjectList): don't expose m_active and m_stored anymore

This prevents our old crap code where anyone can access to StaticObjectList. use proper modifiers. It also permits to do a short cleanup on MapBlock using a helper

* refactoring(MapBlock): reduce a bit exposed m_active_blocks variable

* refactoring: MapBlock::m_node_timers is now private

We already had various helpers to perform this privatization, just use it. Also factorize the MapBlock stepping code for timers using already existing code and importing them from ServerEnvironment to MapBlock.

It's currently done pretty straight forward without any inheritance as MapBlock is just used everywhere, maybe in a future we'll have ServerMapBlock over MapBlock. Currently for a simple function let's just use proper objects and add a comment warning

* refactoring(Server): fix duplicated function for add/remove node

* refactoring(guiFormSpecMenu): add removeAll function to prevent duplicated code

* refactoring(ShadowRenderer) + perf: code quality  + increase performance

* All callers are already using the point and we should never test a function with nullptr node, it's a bug. Removed workaround which was hacky and fix the bug
* Drop clientmap lookup from shadowrendered, just use directly its
  pointer and forbid to push it in the generic list
* Reduce memory pressure on the renderShadowObject by preventing
  deallocating and reallocating multiple vectors on each node

* refactoring(MapBlock): reduce exposure of MapBlock::m_static_objects

It's not complete as some parts of the code are pretty nested, but it's better than before :)

* fix: better working on new functions & drop unwanted 2 lines

Co-authored-by: Jude Melton-Houghton <jwmhjwmh@gmail.com>

Co-authored-by: Jude Melton-Houghton <jwmhjwmh@gmail.com>
2022-11-03 17:35:31 +01:00
485b3b1203 Add comments explaining use of entity glow 2022-10-30 16:53:45 +01:00
bf1cc1bb84 Apply entity glow before translating to color space 2022-10-30 16:53:45 +01:00
7069d99aa6 Fix two spelling mistakes
Co-authored-by: Tobias Frost <tobi@debian.org>
2022-09-25 13:45:27 +02:00
464043b8ab Convert entity glow value to color space before adding to the light 2022-09-04 16:00:13 +02:00
c8ee755c05 Physics overrides: Move values to a common struct (#12591)
Co-authored-by: sfan5 <sfan5@live.de>
2022-08-12 10:17:02 +01:00
d400a98ef0 Fix automatic rotate for attached entities (#12392) 2022-07-17 14:45:57 +01:00
7c261118e0 Release shadow mapping resources when not needed (#12497) 2022-07-09 22:26:39 +02:00
a5f385917d Remove an unused method and header includes 2022-06-28 12:21:12 +02:00
a463620edb Re-order sound-related code (#12382)
Dropped ServerSoundParams -> moved to ServerPlayingSound. This gets rid of the duplicated
'fade' and 'pitch' values on server-side where only one was used anyway.
SimpleSoundSpec is the basic sound without positional information, hence 'loop' is included.

Recursively added PROTOCOL_VERSION to most functions to reduce the versioning mess in the
future. Per-type version numbers are kept for now as a safety rope in a special case.
2022-06-20 21:56:12 +02:00
e92a217bd1 Fix CAO light calculation issue 2022-06-19 13:30:11 +02:00
a83d81ff45 Fix updating glow on entities
was broken in #10021 more than 2 years ago(!)
2022-06-17 20:50:24 +02:00
a4ef62f5b2 Fix lighting of upright_sprite entities (#12336)
Use MeshNode materials to set the light since ReadOnlyMaterials is now false
2022-05-20 22:35:03 +02:00
a89afe1229 Deal with compiler warnings 2022-04-30 16:49:41 +02:00
1d07a36552 upright_sprite: Fix walk animation in first person (#12194) 2022-04-15 18:55:08 +02: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
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
2bba53b2c3 Render shadows on entities.
Fixes problem with mod 'drawers'.
2022-03-07 23:45:26 +01:00
f66ed2c27f Fix local animation not instantly updating after being set 2022-01-19 23:30:18 +01: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
ff934d538c Fix various code & correctness issues (#11815) 2021-12-05 14:40:30 +01:00
206e131854 Add backwards-compatible behaviour if too few CAO textures specified
(#11766)
2021-11-22 17:27:49 +00:00
c9070e54bc Fix local digging animation (#11772) 2021-11-19 22:31:04 +00:00
6910c8d920 Fix number of tool uses being off by 1..32767 (#11110) 2021-10-31 22:33:33 +00:00
86b44ecd82 Add no_texture.png as fallback for unspecified textures 2021-10-20 21:50:16 +02:00
1d69a23ba4 Joystick sensitivity for player movement (#11262)
This commit deprecates the forward, backward, left, and right binary
inputs currently used for player movement in the PlayerControl struct.
In their place, it adds the movement_speed and movement_direction
values, which represents the player movement is a polar coordinate
system.

movement_speed is a scalar from 0.0 to 1.0. movement_direction is
an angle from 0 to +-Pi:

	       FWD
	        0
	        _
	 LFT   / \   RGT
	-Pi/2 |   | +Pi/2
	       \_/
	       +-Pi
	       BCK

Boolean movement bits will still be set for server telegrams and
Lua script invocations to provide full backward compatibility.
When generating these values from an analog input, a direction is
considered active when it is 22.5 degrees away from either
orthogonal axis.

Co-authored-by: Markus Koch <markus@notsyncing.net>
Co-authored-by: sfan5 <sfan5@live.de>
2021-08-27 20:24:24 +02:00
328d949225 Start sprite animation at the beginning (#11509)
When setting a sprite animation, do not keep the last animation's frame number. Setting a new animation should start the animation at the start of the new animation.
2021-08-16 17:56:38 +02:00