-
Notifications
You must be signed in to change notification settings - Fork 88
Revamp shading #52
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
base: main
Are you sure you want to change the base?
Revamp shading #52
Conversation
- New sky model - Custom sun/moon rotation - Rewrite parts of code
|
🔥🔥🔥 |
|
Can someone test sun moon rotation for windows? |
|
ok |
|
Sun/moon rotation in Windows | Minecraft - 1.21.114 |
|
Batman saves the day 🗣️🔥🔥 |
- Add sun/moon glow to sky reflection - Refactor some code
- Follow sun direction now - Enable by default now
|
Can someone test simple, rounded, and realistic clouds movement on windows? It should change with camera position. |
doing a little bit later @devendrn |
|
Clouds 3: Clouds 2: Clouds 1: |
Batman saves the day again |
Windows User |
|
@devendrn
default Clouds was successful |
|
@faizul726 try again. I made a typo previously. |
|
@devendrn there's an animated artifact on the sun see bandicam.2025-10-28.00-36-38-556.mp4bandicam.2025-10-28.00-38-16-128.mp4also, the sun side during rain is a little too bright |
|
@faizul726 when you are free later, check if that sun artifact happens with fully transparent sun texture. |
It's doesn't happen to me Also Fazul, send that transparent sun.png and let me try |
|
@faizul726 does this artifact happen when you set # src/newb/functions/sky.h
- float mg8 = (g8.x+g8.y)*mask*(1.0-0.9*env.rainFactor);
+ float mg8 = 0.0; |
|
@devendrn it's 12 am here right now. i will try to test in morning. also i am updating minecraft to v1.21.120 (which broke materials again) so you may want to update the material source once again. |
still happens @devendrn
|
|
@faizul726 are you sure you applied the change properly? Try again. If it still shows up, try with this change instead: # src/newb/functions/sky.h
- vec2 g = 0.5 - 0.5*vec2(dot(env.sunDir, viewDir), dot(env.moonDir, viewDir));
+ vec2 g = vec2_splat(0.0); |
|
Just a reminder that there are several visual changes. Feedback is needed for me to know whether these changes are moving in the right direction or wrong direction and no new issues are introduced. If lighting could use further improvement, this is the place to comment. I update the PR heading message every commit to include current changes and to-do changes. Please refer that before testing or giving feedback. #52 (comment) |
|
@devendrn sky being bright in rain issue is fixed.
Video_2025-11-01_10-33-20.mp4 |
|
@faizul726 try testing with this change: # src/newb/functions/sky.h
- vec2 g = 0.5 - 0.5*vec2(dot(env.sunDir, viewDir), dot(env.moonDir, viewDir));
+ vec2 g = vec2_splat(1.0); |
|
@devendrn no longer happens. but the glow is gone now.
|
|
Maybe clamping this value could fix this issue. @faizul726 Try this: # src/newb/functions/sky.h
- vec2 g = 0.5 - 0.5*vec2(dot(env.sunDir, viewDir), dot(env.moonDir, viewDir));
+ vec2 g = clamp(0.5 - 0.5*vec2(dot(env.sunDir, viewDir), dot(env.moonDir, viewDir)), 0.0, 1.0); |
|
@devendrn it seemingly fixed the black blob issue. also the animated dot issue is no longer present (at least i can't see anymore) do you want me to test on windows as well?
|
|
@devendrn build fails on windows
|
|
By the way, can I post merged builds in the Newb server for people to try? |
Does the same error come when building Sky material? Also check if this change fixes the error: # src/newb/functions/sky.h
nl_skycolor nlSkyColors(nl_environment env) {
- if (env.end) {
- return nlEndSkyColors(env);
- }
- return nlOverworldSkyColors(env);
+ nl_skycolor s;
+ if (env.end) {
+ s = nlEndSkyColors(env);
+ } else {
+ s = nlOverworldSkyColors(env);
+ }
+ return s;
}
Sure @faizul726 |
From the image, I can see that it fails when building RenderChunk. Not sure if Sky supposed to have problem here. I have already updated to latest commit But even with that commit, I get build failure on
With mentioned fix, #52 (comment)
|
|
To be more specific,
|
|
@faizul726 Try making this change : # src/newb/functions/lighting.h
- float gameBrightness = texture2D(tex, vec2_splat(0.0)).g;
+ float gameBrightness = 1.0; |
|
@devendrn |
|
can confirm happening with |
@faizul726 Because it was made like that for testing purpose. Try to check if this compiles on windows: # src/newb/functions/lighting.h
- float gameBrightness = 1.0;
+ float gameBrightness = texture2DLod(tex, vec2_splat(0.0), 0.0).g; |
|
@devendrn now it builds RenderChunk successfully with both windows and merged (3-in-1) profile |
|
@devendrn
|
|
@faizul726 Can you also check if this compiles in windows: float gameBrightness = texelFetch(tex, ivec2(0,0), 0).g;
Intentionally added. Will remove it from fog next commit. |
|
You're the best, though* even though the newbie version is discontinued, we'll continue it by creating variants. There's a problem, though: the endgame doesn't show its fog in version 1.21.120, and even though I have the fog settings, biome settings, and the biome client, it doesn't seem to work properly. |
|
@devendrn RenderChunk builds with merged profile (android, ios, win) |
@Jesusmendozaxxx I have not tested this shader on 1.21.120. If this is an issue with newb-x-mcbe (built using lastest commit), create a github issue with proper screenshots of the problem. Do not post issues of variants here. This repo is only for newb-x-mcbe only. |
|
@devendrn i forgot to mention that mcpelauncher doesn't support 1.21.120+
yet and all the screenshots you saw are from 1.21.113
…On Thu, Nov 6, 2025, 1:49 AM devendrn ***@***.***> wrote:
*devendrn* left a comment (devendrn/newb-x-mcbe#52)
<#52 (comment)>
There's a problem, though: the endgame doesn't show its fog in version
1.21.120, and even though I have the fog settings, biome settings, and the
biome client, it doesn't seem to work properly.
@Jesusmendozaxxx <https://github.com/Jesusmendozaxxx> I have not tested
this shader on 1.21.120. If this is an issue with newb-x-mcbe (built using
lastest commit), create a github issue with proper screenshots of the
problem. Do not post issues of variants here. This repo is only for
newb-x-mcbe only.
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGXDUIM2E4WNIMY4NQK6GLL33JIFHAVCNFSM6AAAAACJ5VDGLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIOJTGA2DCNRXGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|




























All changes made to this branch will be for testing, and will include redundant code and comments.
Changes in mind for this PR:
Please report any issue with these changes. Feedback will really help.
New Sky
Features
Known issues:
Moon abtruptly changing position right after midnight (FIXED)Sun/Moon flickering near sunrise/sunset (FIXED)Dark blob artifact at sun/moon center in some devices (FIXED)Updated Lighting
Features
Known issuer:
Update clouds
Features
Other changes
Features