Time |
Nick |
Message |
00:28 |
|
YuGiOhJCJ joined #minetest-dev |
01:40 |
|
proller joined #minetest-dev |
02:06 |
|
proller joined #minetest-dev |
02:33 |
|
v-rob joined #minetest-dev |
02:49 |
|
erle joined #minetest-dev |
03:30 |
MTDiscord |
<MisterE> sfan5, in 5.6, a fairly recent build, there is an issue with mesh nodes. Im not sure of the details, but when I play wormball on a minigames server, the food nodes look like half node-sized spheres. when I play on 5.6, tho, the food nodes are tiny, about 1/16 of a node |
03:32 |
erle |
MisterE can you narrow this down using devtest? |
03:34 |
|
v-rob joined #minetest-dev |
03:34 |
erle |
MisterE in mods/testnodes/meshes.lua in devtest there are a bunch of nodes you could try to figure out more, starting with testnodes:mesh testnodes:mesh_double testnodes:mesh_half |
03:36 |
erle |
they all use the testnodes_pyramid.obj – once without visual_scale (which i assume being the same as setting it to 1), once with it set to 2, once with it set to 0.5 |
03:37 |
erle |
MisterE so i suggest to spawn these three in both a working version and a non-working one and report back |
04:00 |
|
MTDiscord joined #minetest-dev |
05:20 |
|
v-rob joined #minetest-dev |
05:51 |
|
calcul0n joined #minetest-dev |
07:48 |
|
x2048 joined #minetest-dev |
07:53 |
x2048 |
Merging #11696 soon unless anyone has objections |
07:53 |
ShadowBot |
https://github.com/minetest/minetest/issues/11696 -- Depth sorting for node faces by x2048 |
07:56 |
x2048 |
Merging https://gist.github.com/x2048/0ec1912f03a2c13553d8513e357a0091 soon. Aligns shadow boundary with fog boundary. |
08:19 |
|
appguru joined #minetest-dev |
08:27 |
|
Baytuch joined #minetest-dev |
08:54 |
|
Fixer joined #minetest-dev |
10:15 |
|
olliy joined #minetest-dev |
10:32 |
|
x2048 joined #minetest-dev |
10:45 |
sfan5 |
@MisterE make sure to open an issue so it isn't forgotten |
10:45 |
erle |
x2048 i applaud that you made the setting for fps drops adjustable |
10:47 |
erle |
x2048 could you tell me where the idea comes from that fps drops are “edge cases”? as far as i have seen, griefers go to great lengths to actually trigger whatever makes clients lags all the time. the “do not render particles” option in waspsaliva is a direct consequence of particle performance being bad. are developers seeing attackers as “edge cases” in general? |
10:48 |
sfan5 |
intentionally provoking worst case behaviour is an edge case yes |
10:49 |
erle |
ah, so it is the edge of theoretical possibility space, not if it happens often in real life. thanks! |
11:43 |
MTDiscord |
<luatic> "real life" != anarchy though |
11:44 |
MTDiscord |
<luatic> anarchy is an edge case of real life :D |
11:59 |
|
olliy joined #minetest-dev |
12:08 |
|
HuguesRoss48 joined #minetest-dev |
12:37 |
erle |
luatic are you aware that the assclown brigade is attacking servers that are not anarchy servers though? |
13:07 |
x2048 |
erle: not that I have explored a lot of servers, but transparent nodes in general have been used rarely on the servers, and I have only seen a couple of places which used multilayered semitransparent structures |
13:08 |
x2048 |
it is also not part of default experience in any known game in minetest |
13:08 |
erle |
x2048 glass? |
13:08 |
x2048 |
but transparent I mean semitransparent nodes, 0 < alpha < 255 |
13:08 |
erle |
i mean sfan5 answered it already, something can be incredibly common in real life and still an edge case since it's a very small part of the possible configurations |
13:09 |
x2048 |
*by |
13:09 |
erle |
uh, wait, is glass a semitransparent node or not? |
13:09 |
erle |
water is, but lots of water columns are usually the kind of things that griefers make ;) |
13:11 |
x2048 |
yes, but water is just one material, and is not the worst offender |
13:11 |
x2048 |
majority of the performance loss is due to GPU pipeline being flushed by frequent material change |
13:12 |
x2048 |
and the worst case is a multilayered multi-textured transparent texture, like a colored glass statue |
13:12 |
x2048 |
*transparent structure, not texture of course |
13:14 |
x2048 |
and I would consider edge cases in relation to an average gameplay, not real life |
13:15 |
x2048 |
default glass is not semitransparent and is not affected by my changes, colored stained glass is. |
13:16 |
x2048 |
non-colored 'frosted' glass is also affected |
13:17 |
x2048 |
as for the griefers, this is a usual tactic for any adversary to use a known (or better uknown) edge case behavior to their advantage. Which does not change the meaning of 'edge case', but also means that they must not be totally ignored |
13:18 |
x2048 |
That's why I added sorting range parameter and made it a low value by default |
13:18 |
erle |
yes, that was a good choice |
13:18 |
erle |
for my own software i always try to get the “best worst case”, but a lot of people optimize for the “best case” |
13:19 |
erle |
x2048 the main thing i feared was that it might open up another avenue for lagging clients – but if it is easy to turn it off, that's not a problem |
13:20 |
erle |
or turn it down |
13:21 |
erle |
x2048 am i correct in assuming that order-independent transparency or whatever it is called will have no such issues? |
13:34 |
x2048 |
yes, but it will bring a different set of challenges :) |
13:39 |
x2048 |
like higher hardware requirements with more textures and non-trivial per-fragment GPU code |
13:40 |
x2048 |
which brings us further away from the fixed pipeline and potato GPUs |
13:54 |
MTDiscord |
<luatic> x2048: that's because it wasn't fixed up until now; you can expect usage to go up now that you've fixed the rendering |
14:12 |
Pexin |
x2048: if you think people dont like to build with stained glass / frosted glass, you must only be on some quite basic servers. i see them constantly. |
14:16 |
rubenwardy |
the fact that people build with that a lot is why it needed to be fixed |
14:21 |
Pexin |
it is my impression that formerly only the closest semitransparent surface was rendered, and all behind it was invisible, but someone considered that a bug. is this currently (or can it become) an available user setting? |
14:24 |
MTDiscord |
<Jonathon> That assumption is incorrect |
14:24 |
|
Taoki joined #minetest-dev |
14:25 |
MTDiscord |
<Jonathon> Having multiple glass layers would render/glitch different depending on the cameras view angle |
15:07 |
|
Fixer_ joined #minetest-dev |
15:09 |
MTDiscord |
<luatic> ^ |
15:09 |
MTDiscord |
<luatic> literally anything could happen |
15:09 |
MTDiscord |
<luatic> but some settings for special blend modes might indeed be useful |
15:16 |
|
Desour joined #minetest-dev |
15:35 |
|
Fixer joined #minetest-dev |
15:53 |
|
Fixer joined #minetest-dev |
16:02 |
sfan5 |
question for Lua experts: can normal code mess with the metatables of userdata? |
16:06 |
Desour |
in general yes. if the metatable has the __metatable field set and you don't have any other access to the metatable (ie. via debug.getmetatable), then no |
16:06 |
MTDiscord |
<Warr1024> Not 100% sure what you mean without maybe some example code, but I think yes, and some mods/games rely on this. |
16:06 |
Desour |
(according to lua reference= |
16:06 |
Desour |
)* |
16:06 |
MTDiscord |
<exe_virus> That moment when you realize you aren't a lua expert |
16:08 |
Desour |
in minetest: until #12118 is merged, yes |
16:08 |
ShadowBot |
https://github.com/minetest/minetest/issues/12118 -- Make `debug.g/setmetatable` respect the `"__metatable_debug"` metatable field by Desour |
16:10 |
MTDiscord |
<Warr1024> That just prevents weird metatable hacking shenanigans and stuff, but doesn't change the ability to modify userdata prototypes' methods, right? |
16:11 |
MTDiscord |
<Warr1024> So like if I want to override inventory:add_item() that shouldn't be affected |
16:15 |
Desour |
if you want to do inventory.add_item = <some function>, you'd use the __newindex meta field, which is nil, so it's an error |
16:16 |
Desour |
(and you couldn't modify the function env either because it's a C function and you don't have debug.g/setfenv) |
16:17 |
Desour |
oh, but I'm seeing right now, that __index and __metatable use the same table, so you can do getmetatable(inv).add_item = ... |
16:18 |
Desour |
which is not affected by the PR |
16:19 |
|
appguru joined #minetest-dev |
16:23 |
wsor |
bit, late, but sfan5: https://gitlab.com/luk3yx/minetest-fs51/-/blob/main/monkey_patching.lua#L149-166 example in the wild |
16:27 |
wsor |
so Desour, if i understand correctly, your PR would deny the ability of mods to override player metatables? if so, thats will break mods, and additionally is counter intuitive since overriding minetest api functions is eve recommended in lua api for some things |
16:27 |
wsor |
s/eve/even |
16:28 |
sfan5 |
the api only recommends overriding global functions, nothing metatable related |
16:28 |
Desour |
wsor: it would not break your example. it only breaks code that uses debug.g/setmatable on minetest's userdata objects |
16:29 |
wsor |
Desour: thank you for the clarification |
16:29 |
Desour |
(as said before, "getmetatable(inv).add_item = ..." is not affected) |
16:30 |
rubenwardy |
Surely it would make more sense just to remove debug.set/getmetatable |
16:30 |
sfan5 |
it would be more secure but also break e.g. mesecons sandbox |
16:30 |
rubenwardy |
~mod mesecons |
16:30 |
ShadowBot |
rubenwardy: <lucky [mod] mesecons site:forum.minetest.net> |
16:30 |
rubenwardy |
_sigh_ |
16:31 |
MTDiscord |
<Jonathon> https://github.com/minetest-mods/mesecons |
16:31 |
rubenwardy |
Mesecons uses getmetatable, not debug.getmetatable |
16:32 |
MTDiscord |
<Jonathon> seems mesecons only uses getmetatable, not debug.getmetatable |
16:42 |
|
x2048 joined #minetest-dev |
16:42 |
rubenwardy |
I'm currently grepping ContentDB. One match is modpol/modpol_core/util/serpent/serpent.lua:local getmetatable = debug and debug.getmetatable or getmetatable |
16:43 |
Desour |
if debug.getmetatable evaluates to nil, that will default to getmetatable |
16:43 |
rubenwardy |
yeah, so that's fine |
16:48 |
|
debiankaios joined #minetest-dev |
16:54 |
sfan5 |
rubenwardy: how does it set the string metatable then? |
16:54 |
sfan5 |
I thought only debug.getmetatable allowed that |
16:55 |
debiankaios |
upps |
16:55 |
debiankaios |
joined wrong |
16:55 |
|
debiankaios left #minetest-dev |
16:55 |
MTDiscord |
<Jonathon> sfan5: https://github.com/minetest-mods/mesecons/blob/master/mesecons_luacontroller/init.lua#L637-L642 |
16:55 |
MTDiscord |
<Jonathon> additionally https://github.com/minetest-mods/mesecons/blob/master/mesecons_luacontroller/init.lua#L203-L209 |
16:56 |
Desour |
strings' metatable has no __metatable field, so getmetatable works normally. only setmetatable does only work on tables |
17:09 |
rubenwardy |
no more matches of debug.[sg]etmetatable found |
17:10 |
rubenwardy |
so it's safe to remove |
17:10 |
rubenwardy |
from CDB's perspective anyway |
17:14 |
Desour |
then removing makes more sense, for simplicity |
17:44 |
MTDiscord |
<luatic> Please don't remove the two funcs! They allow insane levels of haxxory. |
17:44 |
|
troller joined #minetest-dev |
17:45 |
MTDiscord |
<luatic> Such as defining new operators for primitive types like numbers or funcs |
17:45 |
MTDiscord |
<luatic> (funcs aren't primitive, but share one metatable) |
17:45 |
MTDiscord |
<luatic> it literally allows implementing function-based classes without table overhead |
18:09 |
Desour |
luatic: what are function-based classes? |
18:28 |
Zughy[m] |
could any core dev please investigate #12092 when they're free? I made it as specific as possible and I can't pull workarounds to fix that, or you won't able to test (in locale it basically never happens) |
18:28 |
ShadowBot |
https://github.com/minetest/minetest/issues/12092 -- Calling set_detach() + set_properties() + set_pos() on the same step fails to teleport the player half of the time, especially online |
18:47 |
MTDiscord |
<savgirluwu> Zughy: Are you sure it happens with 5.4 server as well? I've encountered the similar issue but only after the server was updated to 5.5. |
19:16 |
rubenwardy |
!title https://content.minetest.net/zipgrep/26b05bca-c5ce-475f-ad72-871b6cceb8b6/ |
19:16 |
ShadowBot |
rubenwardy: 'debug.[gs]etmetatable' - Search Package Releases - ContentDB |
19:17 |
rubenwardy |
(Added a tool to regex search all packages, currently locked to admin rank as it's expensive and potentially not very secure) |
20:05 |
Zughy[m] |
<MTDiscord> "<savgirluwu> Zughy: Are you sure..." <- yes I'm sure, we've been having that problem since we added the spectate mode, a thing we did in.. 5.3 if I stand correctly |
21:02 |
x2048 |
Pexin: there's now a client-side setting that limits depth sorting: https://github.com/minetest/minetest/blob/master/builtin/settingtypes.txt#L863 |
21:02 |
x2048 |
If you set it to 0, you effectively disable depth sorting |
21:21 |
MTDiscord |
<luatic> Desour: basically closures (instance variables stored in upvalues), except you can implement all the syntactic sugar if you can change the func metatable |
21:47 |
|
v-rob joined #minetest-dev |
22:32 |
|
panwolfram joined #minetest-dev |
23:18 |
|
v-rob joined #minetest-dev |