Skip to content

Commit

Permalink
Fixed the particles light calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey2470T committed Apr 30, 2024
1 parent 5801fa7 commit 32ac22c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions client/shaders/nodes_shader/opengl_fragment.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ uniform float fogShadingParameter;
// The cameraOffset is the current center of the visible world.
uniform highp vec3 cameraOffset;
uniform float animationTimer;

#ifdef ENABLE_DYNAMIC_SHADOWS
// shadow texture
uniform sampler2D ShadowMapSampler;
Expand Down Expand Up @@ -376,7 +375,6 @@ void main(void)
#endif

color = base.rgb;

vec4 col = vec4(color.rgb * varColor.rgb, 1.0);

#ifdef ENABLE_DYNAMIC_SHADOWS
Expand Down
2 changes: 0 additions & 2 deletions client/shaders/object_shader/opengl_fragment.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ uniform float fogShadingParameter;
// The cameraOffset is the current center of the visible world.
uniform highp vec3 cameraOffset;
uniform float animationTimer;

#ifdef ENABLE_DYNAMIC_SHADOWS
// shadow texture
uniform sampler2D ShadowMapSampler;
Expand Down Expand Up @@ -379,7 +378,6 @@ void main(void)
#endif

color = base.rgb;

vec4 col = vec4(color.rgb * varColor.rgb, 1.0);
col.rgb *= vIDiff;

Expand Down
2 changes: 1 addition & 1 deletion src/client/particles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ video::SColor Particle::updateLight(ClientEnvironment *env)
else
light = blend_light(env->getDayNightRatio(), LIGHT_SUN, 0);

light += m_p.glow;
light = decode_light(light + m_p.glow);

video::SColor light_color{0xFFFFFFFF};

Expand Down

0 comments on commit 32ac22c

Please sign in to comment.