Closed Lolothepro closed 8 months ago
Apparently older versions of Sodium which included a similar feature expanded the bounding box to work around this.
Won’t expanding bounding box also cause particles to behave differently? Some particles have physics attached to them
Won’t expanding bounding box also cause particles to behave differently? Some particles have physics attached to them
looking at the linked code it doesn't actually change the size it just checks a box that is slightly larger than the particle's bounding box
Jellysquid removed this optimization because it caused too many bugs in Sodium, and was useless.
According to the original PR that added this the improvement was quite substantial and not "useless" https://github.com/MinecraftForge/MinecraftForge/pull/6981
According to the original PR that added this the improvement was quite substantial and not "useless" MinecraftForge/MinecraftForge#6981
Useless compared to the other Sodium optimization.
I looked into this a bit and found that the cause of this is a fundamental design issue (could also call it an outright bug) with particles. The x and z coordinates of a particle are in the center of its bounding box and the y coordinate is at the bottom of said bounding box. This would not necessarily be an issue if the actual rendering (at least of SingleQuadParticle
s like the campfire smoke) wouldn't then put the y coordinate into the center of the quad being rendered. This causes the significant offset between the bounding box and the actual texture in the screenshot below. The most hilarious part of this is that the campfire smoke particle even explicitly compensates for this issue by shrinking the bounding box after setting the quad scale to prevent the particles hovering weirdly below blocks and also offsets the spawn position slightly to make the point of "appearance" look correct.
Note: this doesn't just happen with smoke particles
Yes, as I said, this is a fundamental design flaw with flat particles like the campfire smoke and not limited to the smoke particle.
Workaround: install OptiFine
@Lolothepro wrong. Optifine is not a solution and is a terrible recommendation
@Lolothepro wrong. Optifine is not a solution and is a terrible recommendation
It's not a solution, it's just a workaround, and even if it's a terrible recommendation, it fixes the issue.
Fixed by #458
Minecraft Version: 1.20.1
NeoForge Version: 47.1.79
Neo:
https://github.com/neoforged/NeoForge/assets/68275908/ac971779-b59a-49e7-9f76-dd60182c200b
https://github.com/neoforged/NeoForge/assets/68275908/02901002-52d9-49c0-ae9a-dc5308825fea
https://github.com/neoforged/NeoForge/assets/68275908/da7dfef5-4a5b-49ef-bcd6-3bcc25c294fa
Vanilla:
https://github.com/neoforged/NeoForge/assets/68275908/286f8b4c-73aa-4d28-84a2-b56aba12e71c