Skip to content

Commit

Permalink
Merge pull request #144 from Lyzev/142-bug-fog-blur-rgb-puke-effect
Browse files Browse the repository at this point in the history
fixed bug (second try)
  • Loading branch information
Lyzev authored Jun 15, 2024
2 parents c2af472 + 34bd8c6 commit 7c2cf87
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/kotlin/dev/lyzev/api/opengl/shader/Shaders.kt
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ object ShaderGameOfLife : ShaderCompute("GameOfLife", 32, 1, 1) {
ShaderTint["Color"] = ImGuiScreenFeature.colorScheme[ImGuiScreenFeature.mode].particleIdle
ShaderTint["RGBPuke"] = false
ShaderTint["Opacity"] = 1f
ShaderTint["Alpha"] = true
ShaderTint["Multiplier"] = 1f
ShaderTint["Time"] = (System.nanoTime() - ShaderTint.initTime) / 1000000000f
val yaw = MathHelper.lerpAngleDegrees(mc.tickDelta, mc.player?.yaw ?: 0f, mc.player?.prevYaw ?: 0f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ object BlurHelper {
ShaderTint["Color"] = dropShadowColor
ShaderTint["RGBPuke"] = ModuleToggleableBlur.dropShadowRGBPuke
ShaderTint["Opacity"] = 1f
ShaderTint["Alpha"] = true
ShaderTint["Multiplier"] = ModuleToggleableBlur.dropShadowMultiplier / 100f
ShaderTint["Time"] = (System.nanoTime() - ShaderTint.initTime) / 1000000000f
val yaw = MathHelper.lerpAngleDegrees(mc.tickDelta, mc.player?.yaw ?: 0f, mc.player?.prevYaw ?: 0f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ object ModuleToggleableBlur :
ShaderTint["Tex0"] = 0
ShaderTint["RGBPuke"] = fogRGBPuke
ShaderTint["Opacity"] = fogRGBPukeOpacity / 100f
ShaderTint["Alpha"] = false
ShaderTint["Multiplier"] = 1f
ShaderTint["Time"] = (System.nanoTime() - ShaderAcrylic.initTime) / 1000000000f
val yaw = MathHelper.lerpAngleDegrees(mc.tickDelta, mc.player?.yaw ?: 0f, mc.player?.prevYaw ?: 0f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ uniform sampler2D Tex0;
uniform vec3 Color;
uniform bool RGBPuke;
uniform float Opacity;
uniform bool Alpha;
uniform float Multiplier;
uniform float Time;
uniform float Yaw;
Expand All @@ -32,5 +33,9 @@ void main() {
} else {
color.rgb = mix(color.rgb, Color, Opacity);
}
color.a = clamp(color.a * Multiplier, 0.0, 1.0);
if (Alpha) {
color.a = clamp(color.a * Multiplier, 0.0, 1.0);
} else {
color.a = 1.0;
}
}

0 comments on commit 7c2cf87

Please sign in to comment.