Skip to content

Commit

Permalink
remove alpha value from shaders (now handeled automatically)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuglioIsStupid committed Jun 25, 2024
1 parent 3f7e7a2 commit fdb39cf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 2 additions & 0 deletions src/love/modules/constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ for i, v in ipairs(CONSTANTS.RAW_ARROW_COLORS) do
}
end

CONSTANTS.MS_PER_SEC = 1000

CONSTANTS.WEEKS = {
STRUM_Y = -400,
STRUM_X_OFFSET = 0,
Expand Down
4 changes: 0 additions & 4 deletions src/love/modules/graphics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,6 @@ return {
end
end

if self.updateShaderAlpha then
self.shader:send("a", self.alpha)
end

self.holdTimer = self.holdTimer + dt

if self.specialAnim then
Expand Down
5 changes: 2 additions & 3 deletions src/love/shaders/RGBPallette.glsl
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
extern vec3 r;
extern vec3 g;
extern vec3 b;
extern float a = 1.0;
extern float mult = 1.0;

vec4 effect(vec4 _, Image texture, vec2 texture_coords, vec2 screen_coords)
vec4 effect(vec4 color2, Image texture, vec2 texture_coords, vec2 screen_coords)
{
vec4 color = Texel(texture, texture_coords);

Expand All @@ -14,7 +13,7 @@ vec4 effect(vec4 _, Image texture, vec2 texture_coords, vec2 screen_coords)

vec4 newColor = color;
newColor.rgb = min(color.r * r + color.g * g + color.b * b, vec3(1.0));
newColor.a = color.a * a;
newColor.a = color.a * color2.a;

color = mix(color, newColor, mult);

Expand Down
2 changes: 0 additions & 2 deletions src/love/weeks/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ return {
else
note.alpha = 0.7
end
note.shader:send("a", note.alpha)

if note:getAnimName() == "hold" or note:getAnimName() == "end" then
-- just remove it from boyfriendNotes[i]
Expand Down Expand Up @@ -78,7 +77,6 @@ return {
else
note.alpha = 0.7
end
note.shader:send("a", note.alpha)

if note:getAnimName() == "hold" or note:getAnimName() == "end" then
-- just remove it from enemyNotes[i]
Expand Down

0 comments on commit fdb39cf

Please sign in to comment.