Skip to content

Fix for 26.40 - #101

Merged
devendrn merged 12 commits into
devendrn:mainfrom
IndeedItzGab:24.60
Aug 24, 2026
Merged

Fix for 26.40#101
devendrn merged 12 commits into
devendrn:mainfrom
IndeedItzGab:24.60

Conversation

@IndeedItzGab

@IndeedItzGab IndeedItzGab commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

I removed the rounded clouds terrain in this branch incase my code isn't good enough.

  • Fixed aurora at night time.
    • Problem: FogColor no longer return a value as expected in Clouds material. However, it works as expected in RenderChunk (I have not tested FogColor from other materials)
    • Solution: Instead of using FogColor, we use TimeOfDay as an alternative since it is time accurate than fog color. Also allowing the aurora to be compatible with some texture packs or addons that manipulates fog color.
  • Fixed dimension detection
    • Problem: As of now, I've checked DimensionID, WeatherID, and BiomeID (maybe all materialID) are not working.
    • Solution: I tested FogColor uniform and it is still working. Therefore, we will go back to the old method of detecting dimensions again.
  • Fixed rainbow underwater
    • Problem: Prolly precision issue with a certain GPU
    • Solution: Added conditional if/else statement if the camera is in underwater or not. I expect no branching is going to happen since every rendered results are going to be the same per vertices/fragments.

I'll test all override uniforms to all materials that newb shader used later.

Uniform reference, uniform marked as non-upgradable might be broken (from veka):
https://mc.163.com/dev/mcmanual/mc-dev/mcdocs/4-ShaderSDK/API%E5%8F%82%E8%80%83/4-%E5%86%85%E7%BD%AE%E5%B1%9E%E6%80%A7.html?catalog=1

resolving #99 and #100

@IndeedItzGab IndeedItzGab changed the title Fix for 24.40 Fix for 26.40 Aug 6, 2026
@IndeedItzGab IndeedItzGab added the bug Something isn't working label Aug 6, 2026
@IndeedItzGab

Copy link
Copy Markdown
Collaborator Author

I forgot to change the config.h to soft clouds, will be changed later after I fixed the white cloud

@IndeedItzGab

Copy link
Copy Markdown
Collaborator Author

my bad there are no white clouds at night time :)

I was just using the calculation where it makes the night darker as soon as it hits the expected value in my variant, making newb clouds lighter after sunset/before sunrise.

@IndeedItzGab IndeedItzGab linked an issue Aug 6, 2026 that may be closed by this pull request
@IndeedItzGab

Copy link
Copy Markdown
Collaborator Author

Built-In Uniforms (TESTED):

  • RenderChunk:
    • WORKING
      • FogColor
      • TimeOfDay
    • NOT WORKING
      • DimensionID
      • WeatherID
      • BiomeID
      • CloudHeight
      • LocalClientID
      • MoonPhase
      • RenderDistance
      • CloudColor
      • SunDirection
      • Day
  • Clouds:
    • WORKING
      • TimeOfDay
    • NOT WORKING
      • FogColor
      • WeatherID
      • CloudHeight
      • CloudColor
      • Day
      • RenderDistance
      • SunDirection
      • MoonPhase
      • BiomeID
      • FogColor
      • LocalClientID
      • DimensionID
  • Sky
    • WORKING

      • FogColor
      • TimeOfDay
    • NOT WORKING

      • Day
      • WeatherID
      • DimensionID
      • BiomeID
      • SunDirection
      • CloudHeight
      • RenderDistance
      • SunDirection
      • CloudColor
      • MoonPhase

      will be edited for updates

@faizul726

This comment was marked as off-topic.

@foxiecat014

This comment was marked as off-topic.

@devendrn

devendrn commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Fixed rainbow underwater
Problem: Prolly precision issue with a certain GPU

This is not precision issue with some GPUs. This is just overlapping with my rain detection logic. If you are underwater rain value becomes > 0

Fixed aurora at night time.
Problem: FogColor no longer return a value as expected in Clouds material. However, it works as expected in RenderChunk
Solution: Instead of using FogColor, we use TimeOfDay as an alternative since it is time accurate than fog color. Also allowing the aurora to be compatible with some texture packs or addons that manipulates fog color.

I'm okay with this

Fixed dimension detection
Problem: As of now, I've checked DimensionID, WeatherID, and BiomeID (maybe all materialID) are not working.
Solution: I tested FogColor uniform and it is still working. Therefore, we will go back to the old method of detecting dimensions again.

I'm okay with this also

But I can't merge this PR. It needs some more refactoring

devendrn and others added 3 commits August 15, 2026 23:30
- Removed unnecessary use of Day uniform
- Adjusted to properly sync it with newb's night time and so it won't show early
@IndeedItzGab

Copy link
Copy Markdown
Collaborator Author
  • Added ActorMultiTexture support for 26.40 changes and removed unused uniform "Day" to all other materials and detection.
  • nightFactor was adjusted for aurora borealis to properly sync it with newb's night time. (Before it was showing on sunset/sunrise time)

Comment thread top Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this?

Comment thread src/newb/config.h Outdated

/* Cloud type */
#define NL_CLOUD_TYPE 1 // 0:vanilla, 1:soft, 2:rounded, 3:realistic
#define NL_CLOUD_TYPE 2 // 0:vanilla, 1:soft, 2:rounded, 3:realistic

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undo this

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass env.dayFactor to function. handle masking of aurora inside it. should be like:

renderAurora(cloudPos.xyy, t, env.rainFactor, env.dayFactor)

@devendrn
devendrn self-requested a review August 24, 2026 17:46
@devendrn
devendrn merged commit d6e5d11 into devendrn:main Aug 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The end,nether ambient/sky broke after v26.40 update Auroras disappeared after minecraft 26.40 update Rainbow visible underwater

4 participants