aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/RoundedShader.kt (renamed from src/main/java/at/hannibal2/skyhanni/features/misc/RoundedRectangleShader.kt)17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/RoundedRectangleShader.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/RoundedShader.kt
index 9ce2d0ce7..ab4b1165c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/RoundedRectangleShader.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/RoundedShader.kt
@@ -4,10 +4,7 @@ import at.hannibal2.skyhanni.utils.shader.Shader
import at.hannibal2.skyhanni.utils.shader.Uniform
import net.minecraft.client.Minecraft
-object RoundedRectangleShader : Shader("rounded_rect", "rounded_rect") {
-
- val INSTANCE: RoundedRectangleShader
- get() = this
+abstract class RoundedShader(vertex: String, fragment: String) : Shader(vertex, fragment) {
var scaleFactor: Float = 0f
var radius: Float = 0f
@@ -26,3 +23,15 @@ object RoundedRectangleShader : Shader("rounded_rect", "rounded_rect") {
registerUniform(Uniform.UniformType.VEC2, "centerPos") { centerPos }
}
}
+
+object RoundedRectangleShader : RoundedShader("rounded_rect", "rounded_rect") {
+
+ val INSTANCE: RoundedRectangleShader
+ get() = this
+}
+
+object RoundedTextureShader : RoundedShader("rounded_texture", "rounded_texture") {
+
+ val INSTANCE: RoundedTextureShader
+ get() = this
+}