Skip to content

Commit

Permalink
-Weather fog effects no longer affect underground
Browse files Browse the repository at this point in the history
  • Loading branch information
Eldeston committed Jun 22, 2021
1 parent ea2fa99 commit 3cb42b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion shaders/lib/atmospherics/fog.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ vec3 getFog(vec3 eyePlayerPos, vec3 color, vec3 fogCol, float worldPosY, float s
float waterVoid = smootherstep(nEyePlayerPos.y + (eyeBrightFact - 0.6));

float eyePlayerPosLength = length(eyePlayerPos);
float rainMult = 1.0 + rainStrength;
float rainMult = 1.0 + rainStrength * eyeBrightFact;

#ifdef NETHER
float c = 0.12; float b = 0.08; float o = 0.6;
Expand Down
4 changes: 2 additions & 2 deletions shaders/lib/structs.glsl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Material PBR struct
struct matPBR{
// Light map
vec2 light_m;
// Albedo texture
vec3 albedo_t;
// Normal map
vec3 normal_m;
// Light map
vec2 light_m;
// Subsurface scattering
float ss_m;
// Metalic map
Expand Down
2 changes: 1 addition & 1 deletion shaders/lib/varAssembler.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ void getMaterial(inout matPBR material, vec2 st){
vec3 matRaw2 = texture2D(colortex4, st).xyz;

// Assign materials
material.light_m = matRaw0.xy;
material.albedo_t = texture2D(gcolor, st).rgb;
material.normal_m = mat3(gbufferModelViewInverse) * (texture2D(colortex1, st).rgb * 2.0 - 1.0);
material.light_m = matRaw0.xy;

material.ss_m = matRaw0.z; material.metallic_m = matRaw1.x;
material.emissive_m = matRaw1.y; material.roughness_m = matRaw1.z;
Expand Down

0 comments on commit 3cb42b7

Please sign in to comment.