From 32f5440a2404158beb5ac05e0f11ac4ff01f37e3 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Thu, 31 Aug 2023 11:23:01 +0900 Subject: [PATCH] Minor fixes --- src/electricity_effect.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/electricity_effect.cc b/src/electricity_effect.cc index 7af8b40..0628876 100644 --- a/src/electricity_effect.cc +++ b/src/electricity_effect.cc @@ -116,14 +116,6 @@ bool ElectricityEffect::update(float dt) { void ElectricityEffect::draw(Color color, Camera *camera) { float ratio = timer < lifetime ? (1.0F - timer / lifetime) : 0.0F; - // Update shader values common to all quads. - { - int colDiffuse = GetShaderLocation(shader.value(), "colDiffuse"); - Vector4 normalizedColor = ColorNormalize(color); - SetShaderValue(shader.value(), colDiffuse, &normalizedColor, - SHADER_UNIFORM_VEC4); - } - for (const auto &end_point : end_points) { if (end_point.next_idx >= 0) { std::array quad = get_quad_from_start_end( @@ -246,7 +238,7 @@ void ElectricityEffect::init_shader() { " float distB = distance(pos, closest); \n" " float min_dist = width * 0.3; \n" " if (min_dist < 0.00001) { \n" - " gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); \n" + " gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); \n" " } else if (distA < distB) { \n" " if (distA < min_dist) { \n" " float lerpVal = distA / min_dist; \n"