fix issue with normals dying

This commit is contained in:
Xonk
2024-01-11 15:49:48 -05:00
parent e6a0f2d65d
commit 544af24f10
2 changed files with 7 additions and 2 deletions

View File

@ -78,6 +78,7 @@ uniform sampler2D depthtex0;
uniform vec4 entityColor;
// in vec3 velocity;
flat varying float blockID;
flat varying float SSSAMOUNT;
@ -314,8 +315,8 @@ void main() {
#ifdef Hand_Held_lights
if(HELD_ITEM_BRIGHTNESS > 0.0) torchlightmap = max(torchlightmap, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length(fragpos)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
if(HELD_ITEM_BRIGHTNESS > 0.0) torchlightmap = max(torchlightmap, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length(fragpos)/10,0.0),1.5),0.0,1.0));
#ifdef HAND
torchlightmap *= 0.9;
#endif
@ -475,6 +476,9 @@ void main() {
gl_FragDepth = toClipSpace3(truePos).z;
#endif
normal = applyBump(tbnMatrix, NormalTex.xyz, mix(1.0,1-Puddle_shape,rainfall) );
#endif
//////////////////////////////// ////////////////////////////////