sodium-fabric icon indicating copy to clipboard operation
sodium-fabric copied to clipboard

Optimization for glow ink sac sign.

Open NamiUni opened this issue 4 years ago • 12 comments

Is your feature request related to a problem? Please describe. Yes, it might a problem related to the signs lag (#350) . It is about glow ink sac sign. Like literally, even 10 glow ink sac signs make fps significantly decay.

Describe the solution you'd like The optimization for the sign render Using "Enhanced Block Entities" to resolve by my own.

Describe alternatives you've considered Optimize sign rendering and enhance in performance.

Additional context The video that I filmed to examine the fps ratio per signs: https://youtu.be/2lazxwyKUXw

Enhanced Block Entities: https://www.curseforge.com/minecraft/mc-mods/enhanced-block-entities

NamiUni avatar Jul 25 '21 10:07 NamiUni

Plz update the curseforge link its not working

Rajbir98 avatar Jul 25 '21 10:07 Rajbir98

https://www.curseforge.com/minecraft/mc-mods/enhanced-block-entities is this link working

Rajbir98 avatar Jul 25 '21 11:07 Rajbir98

@Rajbir98 Thank you for pointing that out 😘

NamiUni avatar Jul 25 '21 11:07 NamiUni

Welcome I Also have the same problem i wanted to make a led room with these glowing signs but its lagging my game i get 64 to 90 fps in max it droped to 5 to 10

Rajbir98 avatar Jul 25 '21 13:07 Rajbir98

and with Enhanced Block Entities it becomes 15 to 25 fps so it get rids of a lag a bit but not completely remove the lag

Rajbir98 avatar Jul 25 '21 13:07 Rajbir98

0.4-experiments showed a significant improvement in performance. We look forward to its release. The image shows a comparison between 0.3.2 and 0.4. 2021-09-05_13 00 20

NamiUni avatar Sep 05 '21 04:09 NamiUni

I took a comparison video. 5 times the performance of vanilla and 1.3 times the performance of 0.3.2. https://youtu.be/znGDVf_8ijM

NamiUni avatar Sep 07 '21 10:09 NamiUni

i have been thinking about this issue and my idea on this would be to replace the font of glowing signs with an emmisive font that has an outline, rather then generating an outline for the font by copying text as vanilla does, i did manage to make an example font but i had to do it manually and would prefer a way to do it programatically to avoid headaches for people maintaining it. here is the ascii font file i tested with; ascii

this is probably a fairly important thing to optimise, as one glowing sign is the equivalant of 5 non glowing signs

BeeFox-sys avatar Jun 30 '22 03:06 BeeFox-sys

Doing it separately for each colour, each alphabet, each language would be too much work for a sign and would make compatibility with mods worse.

I don't know what Sodium did in 0.4, so I'm speaking accordingly: (I couldn't find the release notes)

If it renders the text first, then the outline, it would degrade performance a lot. Instead, it might be a much better solution to combine the text with the outline and render it. It would be less work than the previous solution, with better compatibility with mods, but less performance.

EuropaYou avatar Jul 30 '23 01:07 EuropaYou

I think this is efficiently solved in ImmediatelyFast 1.2.4 and above, you just need to enable experimental options

image

Demo
Screenshots by maybemeowing#0000

vanilla image immediatelyfast 1.2.3 image immediatelyfast 1.2.4 image

Tests by wicivo#0000

image image

source

Felix14-v2 avatar Sep 29 '23 20:09 Felix14-v2

Is this still a relevant issue for sodium if immediately fast seems to have more or less fixed it?

douira avatar May 05 '24 22:05 douira

The IF experimental optimization is incompatible with using a different Font than the unreadable default font that comes with Vanilla, and also break for signs with unicode chars.

That being said, there are other mods that also do some work on signs, e.g. EBE, Exordium and these don't have corner cases. They do a good job of making the problem less painful but not sure this is completely solved.

MeeniMc avatar May 06 '24 06:05 MeeniMc