Skip to content

Commit

Permalink
Clearer names for shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
MEEPofFaith committed Feb 8, 2024
1 parent 449da39 commit fa421dd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/drunkustry/audio/DrunkSound.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

public class DrunkSound{
public static final FlangerFilter filter = new FlangerFilter(){{
set(0.2f, 0.4f);
set(0.1f, 0.3f);
}};

public static void init(){
Expand Down
6 changes: 3 additions & 3 deletions src/drunkustry/graphics/DrunkColors.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public class DrunkColors{
public static void init(){
drunkBuffer = new FrameBuffer();

Events.run(Trigger.drawOver, () -> {
Events.run(Trigger.draw, () -> {
drunkBuffer.resize(graphics.getWidth(), graphics.getHeight());
Draw.draw(Layer.endPixeled + 2, () -> {
Draw.draw(Layer.endPixeled + 1, () -> {
drunkBuffer.begin(Color.clear);
Draw.rect();
drunkBuffer.end();
drunkBuffer.blit(DrunkShaders.drunkShader);
drunkBuffer.blit(DrunkShaders.colorHallucination);
});
});
}
Expand Down
13 changes: 6 additions & 7 deletions src/drunkustry/graphics/DrunkShaders.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@
import arc.util.*;
import mindustry.graphics.Shaders.*;

import static arc.Core.files;
import static mindustry.Vars.renderer;
import static mindustry.Vars.tree;
import static arc.Core.*;
import static mindustry.Vars.*;

public class DrunkShaders{
public static DrunkShader drunkShader;
public static DrunkShader drunkWaves;
public static DrunkShader colorHallucination;
public static DrunkShader distortion;

public static void init(){
drunkShader = new DrunkShader("drunk");
drunkWaves = new DrunkShader("drunkWaves");
colorHallucination = new DrunkShader("colorHallucination");
distortion = new DrunkShader("distortion");
}

/** Copy of {@link SurfaceShader} that's able to get my shader. */
Expand Down
6 changes: 3 additions & 3 deletions src/drunkustry/graphics/DrunkWaves.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ public class DrunkWaves{
public static void init(){
wavesBuffer = new FrameBuffer();

Events.run(Trigger.drawOver, () -> {
Events.run(Trigger.draw, () -> {
wavesBuffer.resize(graphics.getWidth(), graphics.getHeight());
Draw.draw(Layer.background - 0.01f, () -> wavesBuffer.begin(Color.clear));
Draw.draw(Layer.endPixeled + 4, () -> {
Draw.draw(Layer.endPixeled + 2, () -> {
wavesBuffer.end();
wavesBuffer.blit(DrunkShaders.drunkWaves);
wavesBuffer.blit(DrunkShaders.distortion);
});
});
}
Expand Down

0 comments on commit fa421dd

Please sign in to comment.