Immersive Portals

Immersive Portals

5M Downloads

ambient light and time don't render correctly in custom dimensions

wouu opened this issue ยท 3 comments

commented

ambient lighting in custom dimensions doesn't appear through portals:
portal scene: there is no ambient lighting
noportal scene: there is ambient lighting

if the custom dimension has a fixed time, lighting also doesn't appear correctly (blocks render as if it's day/night time in the overworld regardless of the fixed time in that dimension):
portal scene: lighting appears as if it's night
noportal scene: lighting appears as normal

commented

Which custom dimension are you using? Seems that you are using OptiFine, does the issue occur without optifine?

commented

Which custom dimension are you using? Seems that you are using OptiFine, does the issue occur without optifine?

first of all, here's the dimension type:

{
  "ultrawarm": false,
  "natural": false,
  "piglin_safe": false,
  "respawn_anchor_works": false,
  "bed_works": true,
  "has_raids": false,
  "has_skylight": true,
  "has_ceiling": false,
  "coordinate_scale": 0.5,
  "ambient_light": 0.05,
  "fixed_time": 6000,
  "logical_height": 256,
  "effects": "test:custom_sky_property",
  "infiniburn": "minecraft:infiniburn_overworld",
  "min_y": 0,
  "height": 256
}

and here's that custom sky property:

@Environment(EnvType.CLIENT)
public class CustomSkyProperty extends SkyProperties {
    public CustomSkyProperty() {
        super(0, true, SkyProperties.SkyType.NORMAL, false, false);
    }

    @Override
    public Vec3d adjustFogColor(Vec3d color, float sunHeight) {
        return color.multiply(sunHeight * 0.94F + 0.06F, sunHeight * 0.94F + 0.06F, sunHeight * 0.91F + 0.09F);
    }

    @Override
    public boolean useThickFog(int camX, int camY) {
        return false;
    }
}

note that i don't think the custom sky property has anything to do with the bug, i just thought it would be worth mentioning just in case it does.

second of all, i wasn't using optifine, i was using sodium, but after testing the issue persisted even without sodium.

commented

Probably fixed.