Time Nick Message 12:32 Fleckenstein is there an issue for the misc problems with shaders disabled yet? like sprite animations displaying black and some animated 3d models displaying white? it's really an annoyance, not sure whether this is already being worked on or whether i should try to fix it myself 12:32 Fleckenstein i believe its a problem with irrlicht, or am i mistaken? 13:12 sfan5 those issues are news to me 13:25 MTDiscord um, wasn't it that bug erlehmann was talking about in regards to mineclone's enchanting table book model having a glitched texture in 5.5.0-dev? 13:38 Fleckenstein most likely yes 13:38 Fleckenstein its an older bug 13:38 Fleckenstein i _somehow_ resolved it for chests and shulkerboxes by exporting the model in blender in a very specific way but it was quite a pain and I don't know how exactly i did it anymore 13:39 Fleckenstein the thing really is, if shaders are enabled, everything is fine 13:55 Fleckenstein so, am i right assuming that there has not been done any work yet? is there anything i should know trying to fix it? 13:58 MTDiscord WDYM by "glitched texture"? 13:59 MTDiscord Might be related to normals 15:08 MTDiscord The README does not say how to run the unit tests. I haven't run them before; should I know anything about this? 15:32 Fleckenstein its simply just white or black 15:32 Fleckenstein entirely 15:52 MTDiscord I can't figure out how to run the tests. Please advise. 15:54 MTDiscord Which tests? Lua or C++ ones? 15:54 MTDiscord C++ 15:54 Fleckenstein isnt it --run-unittests? 15:55 MTDiscord Ah, thank you. 15:56 MTDiscord Well, this is quite something. 15:56 MTDiscord I caused an overflow error in the pseudorandom number generator. 15:57 MTDiscord Should I even open an issue for this... 16:00 Fleckenstein oh no, in 5.5-dev the bug is even there with shaders enabled 16:00 MTDiscord I'll bet I have ubsan still compiled in. I'll just disable that. 16:01 MTDiscord better to open a PR XD 16:01 sfan5 so did it not happen with shaders disabled? 16:02 sfan5 https://github.com/minetest/minetest/issues/11146 might be related btw 16:02 sfan5 though I haven't seen anyone who is able to reproduce it 16:02 MTDiscord savilli, whover wrote this pretty clearly accepted it would have UB. Fixing this mess is something nobody wants to deal with. 16:03 MTDiscord I looked at the code and it's blaringly obvious. 16:03 MTDiscord or they just forgot to cast to unsigned 16:03 MTDiscord erlehmann seems to be able to reproduce it, he was talking about it as late as 4 days ago 16:03 MTDiscord https://irc.minetest.net/minetest-dev/2021-10-31#i_5892518 16:04 sfan5 keeping track of bugs that only get discussed but not properly filed is kinda hard... 16:09 Fleckenstein in 5.5-dev, its white if shaders are off, black if shaders are on 16:09 Fleckenstein kinda funny ngl 16:10 Fleckenstein tried to bisect it but git bisect decided to SEGFAULT lmao 16:13 MTDiscord How many of the Minetest CI builds run unit tests? 16:14 MTDiscord looks to be all linux compilers and the macos build 16:15 MTDiscord Thank you. 16:24 MTDiscord "test them all" he said. Guess what, exhaustively testing every possible noise2d input is incredibly slow. 16:25 MTDiscord I estimate around 4096 minutes to complete, give or take. 16:25 MTDiscord Wait no. 16:25 MTDiscord 4096 * 4096 minutes 16:26 MTDiscord I need answers, erlehmann. 18:55 erlehmann i just read a bit of the logs. Fleckenstein is right, the bug is there in 5.5-dev with or without shaders. without shaders, the textures are white. with shaders, textures are black. 18:56 erlehmann i did not have any success bisecting the issue. 19:00 erlehmann Fleckenstein btw, it is a good idea to put all build scripts for (binary) artifacts in the repository. i have no idea, for example, how colors.json was created or how to recreate the blender exports for anything. 19:01 erlehmann oh, wrong channnel sorry 20:08 x2048 I'm fixing rendering of shadows on entities, and I see this behavior that Minetest/irrlicht loads some models with insane normals, while other models are fine. Does anyone know the reason? 20:09 sfan5 normals are only recalculated if they seem wrong 20:09 sfan5 also make sure you have the latest irrlichtmt 20:10 x2048 good catch, I'll try with the latest head, thanks sfan5 20:11 x2048 I've tried forcing the recalculation, but (a) for some reason MT asks to produce 'smooth' normals which makes little sense, and (b) it does not seem to change a lot. digging deeper... 20:14 x2048 side notice, it looks like MeshCache in irrlichtmt does not work, at least in debug build. Had to skip through 25 loads of stairs.obj 20:14 sfan5 that's intentional 20:15 x2048 is that because of texturepacks? 20:16 sfan5 it's because the code needs to modify the instance of the model it has or something 20:26 x2048 Maybe we could tweak it to use the cache and clone the mesh on get, would save parsers some work. 20:26 x2048 Latest irrlicht, force mesh recalcualtion: https://user-images.githubusercontent.com/4933697/140414550-14e6fe37-6f4a-4b43-9070-e6215d9a645c.png 20:26 x2048 sorry, s/mesh/normals/ 20:27 sfan5 I did sort of but the only thing it did is increase ram usage #11652 (unclear if it's faster) 20:27 ShadowBot https://github.com/minetest/minetest/issues/11652 -- Preload meshes at startup by sfan5 20:29 sfan5 blue are supposed to be normals? 20:30 x2048 Yes, added this to show them: m_animated_meshnode->setDebugDataVisible(scene::EDS_NORMALS | scene::EDS_MESH_WIRE_OVERLAY); 20:31 sfan5 looks like total nonsense 20:31 sfan5 but how would it get those wrong 20:33 x2048 One thing I found is this potential bug in exporter for blender: https://github.com/joric/io_scene_b3d/blob/master/export_b3d.py#L1136 20:33 x2048 Notice the order of x, y, z 20:33 sfan5 if you force recalculation that shouldn't matter 20:36 x2048 I agree, will debug the mesh manipulator now to find out what's going on 20:36 x2048 I'm also puzzled why player's model is perfectly fine 21:51 erlehmann x2048 any luck bisecting it? 21:55 sfan5 if I had to guess it happens even on the very first revisions that use IrrlichtMt 21:55 erlehmann why though 21:57 x2048 Kind of... models that are affected reuse vertices in the vertex buffer. Mesh manipulator will not calculate the normals for sharp edges correctly, because the vertex can only store one normal vector. 22:07 x2048 They are also animated, and I'm looking for how this affects the normals. 22:25 sfan5 huh 22:26 sfan5 erlehmann: simply going from irrlicht 1.8 to their indev version broke a few things, wouldn't be surprised if this is one