Skip to content

Commit

Permalink
Added slight directional lighting from the sun
Browse files Browse the repository at this point in the history
  • Loading branch information
Martomate committed Jul 15, 2024
1 parent 7a5807f commit e38d7fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/main/resources/shaders/block/frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void main() {
#endif

vec3 sunDir = normalize(sun);
float visibility = 1 - (side < 2 ? side * 3 : (side - 2) % 2 + 1) * 0.05;//max(min(dot(fragIn.normal, sunDir) * 0.4, 0.3), 0.0) + 0.7;// * (max(sunDir.y * 0.8, 0.0) + 0.2);
float visibility = max(dot(fragIn.normal, sunDir), 0) * 0.2 + 0.8;

color.rgb *= (fragIn.brightness * 0.8 + 0.2) * visibility;
}

0 comments on commit e38d7fa

Please sign in to comment.