ImmersivePortalsMod icon indicating copy to clipboard operation
ImmersivePortalsMod copied to clipboard

Incompatibility with Create/Flywheel (Fabric versions)

Open AeiouEnigma opened this issue 3 years ago • 16 comments

Copy of https://github.com/Fabricators-of-Create/Create/issues/53

Extraordinary rendering issues occur when looking through an Immersive Portal while the Fabric version of Create is installed. This issue is presumably caused by interaction with Create's rendering dependency, Flywheel (which is included in builds of Create for Fabric).

Example:

image

Although sodium/indium/other mods were in use when capturing this screenshot, the issue is reproducible with only Create (which again includes Flywheel), Fabric API, and Immersive Portals.

AeiouEnigma avatar Jan 20 '22 20:01 AeiouEnigma

Can you explain the screenshot? Are you in overworld in the screenshot? Is the nether fog color normal? Does it render normal when you are not looking any portal?

qouteall avatar Jan 21 '22 02:01 qouteall

I'm in a snowy slopes biome in the overworld. This rendering issue occurs when a portal is being rendered. Everything is normal when a portal isn't in view.

AeiouEnigma avatar Jan 21 '22 02:01 AeiouEnigma

Are you having night vision or things that affect nether sky color? Is the nether sky color normal?

qouteall avatar Jan 21 '22 02:01 qouteall

Yes, I did have night vision on for unrelated reasons when capturing the screenshot. Please disregard that 🙃

AeiouEnigma avatar Jan 21 '22 02:01 AeiouEnigma

Try using command /imm_ptl_client_debug render_mode_compatibility and report what happens

qouteall avatar Jan 21 '22 02:01 qouteall

Rendering greatly improves, with some very slight, hard to describe glitchiness about how far away chunks will render on the other side of the portal

2022-01-20_21 14 45

AeiouEnigma avatar Jan 21 '22 02:01 AeiouEnigma

The problem persists after https://github.com/qouteall/ImmersivePortalsMod/commit/aae537317b984ccf529cbc8dfcc37e9f7840f51b

Also, here's another, better screenshot of the issue:

2022-01-22_16 00 06

The differing effects for water vs solid blocks in the player's current dimension probably means... something 😕

AeiouEnigma avatar Jan 22 '22 21:01 AeiouEnigma

I cannot reproduce the issue with only flywheel without create Maybe because it's not rendering any create thing

qouteall avatar Jan 23 '22 05:01 qouteall

With another testing, it crashes. Possibly because that it destroy all GL resources when ImmPtl create another client world

https://github.com/Jozufozu/Flywheel/blob/1.18%2Ffabric%2Fdev/src/main/java/com/jozufozu/flywheel/mixin/LevelRendererMixin.java#L92

https://github.com/Jozufozu/Flywheel/blob/1.18%2Ffabric%2Fdev/src/main/java/com/jozufozu/flywheel/FlywheelClient.java#L47

This cannot be fixed on ImmPtl's side. Flywheel can make that event triggered in Minecraft.clearLevel so that it won't trigger when ImmPtl creates secondary client world and secondary world renderer.

You can open an issue on Flywheel

qouteall avatar Jan 23 '22 05:01 qouteall

Thanks for investigating! I'll bring it up with Flywheel.

AeiouEnigma avatar Jan 23 '22 05:01 AeiouEnigma

try "/flywheel backend off"

Specimen-420 avatar Feb 08 '22 16:02 Specimen-420

try "/flywheel backend off"

That has no effect of any kind on the problem whatsoever.

The Flywheel backend is disabled in the original screenshot of the issue.

AeiouEnigma avatar Feb 08 '22 23:02 AeiouEnigma

In immptl 1.3.7 the crash and portal rendering issue is fixed. but the create things in remote dimensions may still not get rendered correctly until F3+A.

qouteall avatar May 15 '22 06:05 qouteall

for me it's just outright crashing

ProGoofster avatar May 17 '22 22:05 ProGoofster

I wasn't getting this particular rendering issue, but I do get this thing (v1.4.8), which just makes portal-in-portal not render:

[10:43:34] [Render thread/ERROR]: uniform imm_ptl_ClippingEquation not found in transformed iris shader

I assume this is something along the lines of Flywheel changing the names of shaders, so that now Immersive Portal doesn't do its transformation magic to those shaders?

I did some investigation adding more debugging to try and figure out which shader it is, but whatever it is, it isn't going via MixinProgram.compileShaderInternal.

[13:11:09] [Render thread/INFO]: Shader Transform Skipping shadow_text_intensity
[13:11:09] [Render thread/INFO]: Created transformed shader id 389 name = shadow_text_intensity
[13:11:09] [Render thread/INFO]: Shader Transform Skipping shadow_text_intensity
[13:11:09] [Render thread/INFO]: Created transformed shader id 390 name = shadow_text_intensity
[13:11:09] [Render thread/ERROR]: uniform imm_ptl_ClippingEquation not found in transformed iris shader id = 394
[13:11:09] [Render thread/ERROR]: uniform imm_ptl_ClippingEquation not found in transformed iris shader id = 397

Reading Flywheel's code, it seems that they have their own shader compilation code, and maybe these aren't being hooked yet.

https://github.com/Jozufozu/Flywheel/blob/af11d1e78b0b5753bcdd2e87a9875a48d8f52138/src/main/java/com/jozufozu/flywheel/backend/gl/shader/GlShader.java#L19

hakanai avatar Jul 12 '22 01:07 hakanai