Time Nick Message 01:29 muurkha haha 01:41 muurkha sparky4: I see you got back to your dorm 03:16 wsor4035 !tell wsor4035 test 03:16 MinetestBot You can tell that to yourself 03:16 wsor4035 good 03:17 wsor4035 !tell shaft assuming that you agree to behave and learn from this, we will unban you one week from now for a second chance 03:17 MinetestBot wsor4035: I'll pass that on when shaft is around 08:03 copygirl So when I define an entity with use_texture_alpha enabled, for some reason it looks like there is still a cutoff at 50% alpha or something? Part of the model ends up being completely invisible, rather than semi-seethrough. 08:04 copygirl https://i.imgur.com/hsq1tet.png 08:08 copygirl Here is the full model visible with an opaque texture: https://imgur.com/Rk7gkim.png 08:10 MTDiscord by texture_alpha enabled, do you mean you've set it to "blend"? 08:11 copygirl That's for nodes. It complained when I tried to use "blend" for an entity. 08:11 copygirl According to the API, entities have `use_texture_alpha` that's just a boolean. 08:12 MTDiscord oh I see, you're talking about an entity not a node 08:13 MTDiscord hm, I'm unsure if semitransparent textures are even possible in an entity then if use_texture_alpha wouldn't work for it 08:16 copygirl It *does* work it's just cut off past a certain point for some reason. 08:16 MTDiscord yes, sounds like alpha clipping behaviour 08:19 sfan5 in other terms: for entities you chave the choice between "blend" (true) and "clip" (false) 08:19 sfan5 dunno how well semi-transparency even works however 08:43 copygirl Oh it's a year-old bug? #10032 08:43 ShadowBot https://github.com/minetest/minetest/issues/10032 -- Entity translucency is still broken 08:47 erle that sounds like an easy fix 08:48 erle copygirl looks like a one-line-fix, how about you make a PR? 08:49 erle like cut it off at 1/256 or so 08:49 copygirl The cut off should be at 0 for alpha blended entities. 08:50 copygirl I don't touch C++ though. 08:50 erle it's a constant WHAT CAN POSSIBLY GO WRONG :D 08:54 copygirl Me touching C++ is what could go wrong. 08:54 copygirl I'm not touching game engine code besides my own. 10:10 MTDiscord sfan5: in theory, semi-transparency works by rendering semitransparent triangles in the correct order (back to front) 10:10 MTDiscord in practice, we don't do that, but I think we render entities that are farther away sooner? (entities are distance sorted) 10:13 MTDiscord so semitransparency across different entities should work, but semitransparency across different faces of the same entity (as in sorcerykid's example), or across entities / nodes / particles won't work 10:14 MTDiscord (it gets even hairier if you want(ed) to properly deal with the "edge case" of intersecting triangles; then you'll have to split up triangles) 10:15 MTDiscord solving this efficiently is hard. perhaps the easiest solution would be some form of "order-independent transparency" (i think Multicraft does this?). implementing this inefficiently in software rendering is easy (basically go from a single texture + depth buffer to a sorted set of colors + depths per pixel), but I don't know how one would implement it efficiently in GLSL. 10:17 MTDiscord a naive "triangle sorting" approach isn't really an option; it would greatly complicate the code and probably be way too inefficient. for example you might have to break up mapblock meshes. 10:21 sfan5 don't we have working semi-transparency for mapblocks already? why can't this solution be applied to entities? 10:35 MTDiscord sfan5: for some definition of "working", we do. but AFAIK there's (1) no mesh-interior semitransparency support (2) no support for particle-mapblock / entity-mapblock semitransparency. 10:37 MTDiscord IIRC what it did was (1) sort the mapblocks (as we already do for the entities), (2) change the meshgen to produce different meshes depending on which direction the mapblocks are viewed from, such that (some?) faces are properly sorted 10:38 MTDiscord what we'd have to do for semitransparent entities is effectively sort the triangles of the mesh based on their distance to the camera (z-sorting). special cases (like the cube drawtype) can get simpler solutions. 10:40 sfan5 ah okay that makes sense 15:06 MTDiscord " I'm not touching game engine code besides my own." <-- besides, having to depend on a fork of MT to make your mod work correctly would kinda defeat the whole purpose of using MT in the first place... 15:09 erle Warr1024 well you can add a PR after that right 15:17 MTDiscord I suppose that PRs are still theoretically a thing, yeah. 16:05 copygirl @luatic: To be clear, I'm not running into a sorting issue here. NodeCore has few semi-transparent elements and my arrows would render on top of opaque blocks. Water is unlikely to be involved either. The renderer simply throws away pixels that have <50% transparency. 16:15 MTDiscord NodeCore has historically avoided use of semi-transparent anything specifically because of the known issues with them at the time I started the project, and I haven't started to rely heavily on the improvements since then either.