Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Monsterovich committed Oct 28, 2024
1 parent 8e51412 commit 2411872
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
17 changes: 12 additions & 5 deletions data/base/shaders/tcmask_instanced.frag
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/droid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,8 @@ void droidUpdate(DROID *psDroid)
droidUpdateDroidSelfRepair(psDroid);
}

if (bMultiPlayer) {
if (bMultiPlayer)
{
droidUpdateShields(psDroid);
}

Expand Down

0 comments on commit 2411872

Please sign in to comment.