From 241187266d5aa07ef0fc60ce189ff9e99b902ff1 Mon Sep 17 00:00:00 2001 From: Monsterovich Date: Mon, 28 Oct 2024 03:23:08 +0200 Subject: [PATCH] Format code --- data/base/shaders/tcmask_instanced.frag | 17 ++++++++++++----- src/droid.cpp | 3 ++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/data/base/shaders/tcmask_instanced.frag b/data/base/shaders/tcmask_instanced.frag index 8202fd00ed7..eb768615b8b 100644 --- a/data/base/shaders/tcmask_instanced.frag +++ b/data/base/shaders/tcmask_instanced.frag @@ -75,7 +75,8 @@ out vec4 FragColor; #include "pointlights.frag" #endif -float random(vec2 uv) { +float random(vec2 uv) +{ return fract(sin(dot(uv.xy, vec2(12.9898, 78.233))) * 43758.5453123); } @@ -423,20 +424,26 @@ void main() } #ifdef NEWGL - if (shieldEffect == 1) { + if (shieldEffect == 1) + { float cycle = 0.66 + 0.66 * graphicsCycle; vec3 col = vec3(random(vec2(fragColour.x * cycle, fragColour.y * cycle))); col.b *= 1.5; FragColor = vec4(col, fragColour.a / 6.0); - } else { + } + else + { FragColor = fragColour; } #else - if (shieldEffect == 1) { + if (shieldEffect == 1) + { vec3 col = vec3(random(vec2(fragColour.x * cycle, fragColour.y * cycle))); col.b *= 1.5; gl_FragColor = vec4(col, fragColour.a / 6.0); - } else { + } + else + { gl_FragColor = fragColour; } #endif diff --git a/src/droid.cpp b/src/droid.cpp index 6ee9ed81136..cff4e18db12 100644 --- a/src/droid.cpp +++ b/src/droid.cpp @@ -911,7 +911,8 @@ void droidUpdate(DROID *psDroid) droidUpdateDroidSelfRepair(psDroid); } - if (bMultiPlayer) { + if (bMultiPlayer) + { droidUpdateShields(psDroid); }