mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-23 01:59:39 +08:00
fix issue with normals dying
This commit is contained in:
parent
e6a0f2d65d
commit
544af24f10
@ -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
|
||||
|
||||
//////////////////////////////// ////////////////////////////////
|
||||
|
@ -862,6 +862,7 @@ void main() {
|
||||
|
||||
|
||||
float skylight = max(pow(viewToWorld(FlatNormals).y*0.5+0.5,0.1) + SkylightDir, 0.25 + (1.0-lightmap.y) * 0.75) ;
|
||||
// skylight = 0.0;
|
||||
|
||||
AmbientLightColor *= skylight;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user