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

Cloudless sky on certain worlds fix #299

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shaders/dimensions/composite1.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ void main() {
#if RESOURCEPACK_SKY == 1 || RESOURCEPACK_SKY == 0 || RESOURCEPACK_SKY == 3
// vec3 orbitstar = vec3(feetPlayerPos_normalized.x,abs(feetPlayerPos_normalized.y),feetPlayerPos_normalized.z); orbitstar.x -= WsunVec.x*0.2;
vec3 orbitstar = normalize(mat3(gbufferModelViewInverse) * toScreenSpace(vec3(texcoord/RENDER_SCALE,1.0)));
float radiance = 2.39996 - (worldTime + worldDay*24000.0) / 24000.0;
float radiance = 2.39996 - (worldTime + (worldDay & 0xFFFF) * 24000.0) / 24000.0;
// float radiance = 2.39996 + frameTimeCounter;
mat2 rotationMatrix = mat2(vec2(cos(radiance), -sin(radiance)), vec2(sin(radiance), cos(radiance)));

Expand Down
4 changes: 2 additions & 2 deletions shaders/dimensions/deferred.vsh
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ void main() {
// as the day counter changes, switch to a different set of stored values.

#ifdef CHOOSE_RANDOM_WEATHER_PROFILE
int dayCounter = int(clamp(hash11(float(mod(worldDay, 1000))) * 10.0, 0,10));
int dayCounter = int(clamp(hash11(float(mod(worldDay & 0xFFFF, 1000))) * 10.0, 0,10));
#else
int dayCounter = int(mod(worldDay, 10));
int dayCounter = int(mod(worldDay & 0xFFFF, 10));
#endif


Expand Down
4 changes: 2 additions & 2 deletions shaders/lib/climate_settings.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
int SeasonLength = Season_Length;

// loop the year. multiply the season length by the 4 seasons to create a years time.
float YearLoop = mod(worldDay + Start_Season * SeasonLength, SeasonLength * 4);
float YearLoop = mod((worldDay & 0xFFFF) + Start_Season * SeasonLength, SeasonLength * 4);

// the time schedule for each season
float SummerTime = clamp(YearLoop ,0, SeasonLength) / SeasonLength;
Expand Down Expand Up @@ -95,7 +95,7 @@
int SeasonLength = 1;

// loop the year. multiply the season length by the 4 seasons to create a years time.
float YearLoop = mod(worldDay + SeasonLength, SeasonLength * 4);
float YearLoop = mod((worldDay & 0xFFFF) + SeasonLength, SeasonLength * 4);

// the time schedule for each season
float SummerTime = clamp(YearLoop ,0, SeasonLength) / SeasonLength;
Expand Down
2 changes: 1 addition & 1 deletion shaders/lib/volumetricClouds.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ float LAYER2_DENSITY = mix(dailyWeatherParams1.z,0.05,rainStrength);

uniform int worldDay;

float cloud_movement = (worldTime + mod(worldDay,100)*24000.0) / 24.0 * Cloud_Speed;
float cloud_movement = (worldTime + mod(worldDay & 0xFFFF,100)*24000.0) / 24.0 * Cloud_Speed;

//3D noise from 2d texture
float densityAtPos(in vec3 pos){
Expand Down