Skip to content

Commit c641177

Browse files
committed
Some changes
1 parent 965effb commit c641177

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"description": " An aesthetic shader for Minecraft!\n \n v1.1.9b §3https://mcpedl.com/newb-shader/",
55
"name": "Newb Shader",
66
"uuid": "95f774cf-4afa-73e7-a21a-72146307b1d2",
7-
"version": [1, 1, 899],
7+
"version": [1, 1, 9],
88
"min_engine_version": [1, 14, 10]
99
},
1010
"modules": [
1111
{
1212
"description": " An aesthetic shader for Minecraft!",
1313
"type": "resources",
1414
"uuid": "900f3d8b-37b4-465f-8f56-941687e36c35",
15-
"version": [1, 1, 899]
15+
"version": [1, 1, 9]
1616
}
1717
],
1818
"metadata": {

shaders/glsl/terrain.vertex

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,6 @@ if(rainFactor > 0.0){
667667
if(chunkBorder){ wetness = max(0.5+0.5*sin((cPos.x+cPos.z)*rd),0.6);}
668668
else{ wetness = min(0.4+0.6*fastRand(cPos.xz*1.4),1.0);}
669669
wetness *= lit.y*lit.y;
670-
color.rgb *= 1.0-0.5*wetness*rainFactor;
671670

672671
// cosine of incidence angle
673672
float cosR = max(viewDir.y,float(wPos.y > 0.0));
@@ -680,11 +679,18 @@ if(rainFactor > 0.0){
680679
streaks = sin(streaks*7.0);
681680
streaks *= streaks;
682681

683-
wetRefl.rgb *= 1.0+(streaks*float(uv1.y<0.88));
682+
wetRefl.rgb *= 1.0+(0.7*streaks*float(uv1.y<0.88));
684683
wetRefl.rgb += 0.9*torchLight*streaks;
685684

686685
// hide effect far from player
687-
wetRefl.a *= 1.0-clamp( (2.0*camDist/endDist)-1.0 ,0.0 ,1.0 );
686+
float mask = clamp( (2.0*camDist/endDist)-1.0 ,0.0 ,1.0 );
687+
wetRefl.a *= 1.0-mask;
688+
689+
// darken wet parts
690+
color.rgb *= 1.0-0.5*wetness*rainFactor;
691+
}
692+
else{
693+
color.rgb *= 1.0-0.4*lit.y*lit.y*rainFactor;
688694
}
689695

690696
}

0 commit comments

Comments
 (0)