Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lucent Mod Compat #105

Open
5 tasks done
Darkosto opened this issue Apr 24, 2023 · 5 comments
Open
5 tasks done

Lucent Mod Compat #105

Darkosto opened this issue Apr 24, 2023 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed Mod Compatibility A compatibility issue

Comments

@Darkosto
Copy link

According to your testing, does the issue occur with ONLY Immersive Portals mod installed?

Yes

Forge Version

40.2.0

ImmersivePortals Version

1.4.16-1.18.2

Latest Log

https://gist.github.com/Darkosto/749bb8e48566dfd294c455e378574595 https://gist.github.com/Darkosto/cd300d383d45a8e1dbc07d89b557384d

Crash Report (if applicable)

No response

Steps to Reproduce

  1. Install both ImmersivePortals and Lucent mod
  2. Travel to a darker location underground and build a Nether Portal
  3. Hold a torch in hand for the emissive lighting to occur
  4. Once the portal is lit, the lighting and the torch in-hand should start flashing and/or flickering

What You Expected

I would expect having no screen flashes when a portal is opened

What Happened Instead

After opening a portal, the lighting will quickly flash and flicker

Additional Details

I tried disabling rendering options in both mod configs with no luck, the flashing still occurs

Please Read and Confirm The Following

  • I have confirmed this bug can be replicated without the use of Optifine.
  • I have confirmed the details provided in this report are concise as possible and does not contained vague information (ie. Versions are properly recorded, answers to questions are clear).
  • I have confirmed this does not happen on the fabric version (If it does please report to here instead).
  • I have confirmed I'm not using a hybrid server (Magma, Cauldron) or a different (non official) Forge Server release.
  • I have confirmed this issue is unique and has not been reported already.
@Darkosto Darkosto added the bug Something isn't working label Apr 24, 2023
@Nick1st Nick1st added the Mod Compatibility A compatibility issue label Apr 24, 2023
@Nick1st
Copy link
Member

Nick1st commented May 3, 2023

I was able to reduce the flickering by a fair amount, but it's still not gone and comes with a reduced light propagation speed. Still have to do a lot on this issue...

@Nick1st
Copy link
Member

Nick1st commented May 5, 2023

I unfortunately have to inform you that this issue will not be fixed due to the complexity of all potential fixes I'm currently aware of.
Lucent's light engine runs on a separate thread, and assumes some things (e.g. single client dimension, single dimension renderer), that are simply not true when having a ImmersivePortals portal near. The second issue is relatively easy to work around, but requires patching Lucents code in ~40 places, which is not feasible to maintain in the long term. The first issue though is the real problem that needs to be solved, and I currently don't think this is possible without a complete rewrite of Lucent's engine. The problem here is that we need to only tick their engine if the fields they access have the expected references. So we have to either skip their engine ticks or drastically pause them during execution (because they run on a different thread, the references can be swapped a bunch of times during their tick). Another way would be to move their logic onto the main thread, though that will neglect all benefits of the engine being parallel in the first place, likely causing huge frame drops.~~
So fixing this issue is not feasible, taking into consideration the enormous amount of work it would take, that ModdingLegacy does not support older versions than the latest and that I need to finish other projects.
However I'll leave this issue open, and I'm open for discussion if someone has some ideas on how to fix this.

@Nick1st Nick1st added help wanted Extra attention is needed wontfix This will not be worked on labels May 5, 2023
@Nick1st
Copy link
Member

Nick1st commented May 8, 2023

Note: Other messages were deleted as they contained broken builds

Can you try with this build? (Rename from .zip to .jar, Github is stupid)

immersive-portals-1.4.16-mc1.18.2-forge.zip

@Nick1st Nick1st removed the wontfix This will not be worked on label May 9, 2023
@Nick1st
Copy link
Member

Nick1st commented May 9, 2023

The flickering is fixed. There are still some limitations. This opens a few long term goals that I'll also track in this issue:

  • Porting this fix to newer versions
  • Cross-Portal dynamic lighting for global portals only (others aren't reasonably doable)
  • Rubidium / Oculus Support (they currently break the dynamic lighting)
  • Smoothing out some internal details

You can expect a build with the current fix on Curseforge within the next days.

@iPortalTeam iPortalTeam deleted a comment from Darkosto May 9, 2023
@Nick1st Nick1st changed the title Incompatibility with Lucent Mod Lucent Mod Compat May 9, 2023
@Nick1st Nick1st added enhancement New feature or request and removed bug Something isn't working labels May 9, 2023
Nick1st added a commit that referenced this issue May 11, 2023
@Nick1st
Copy link
Member

Nick1st commented May 15, 2023

Can you please test if this build works with rubidium?
immersive-portals-1.4.17-mc1.18.2-forge.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed Mod Compatibility A compatibility issue
Projects
None yet
Development

No branches or pull requests

2 participants