diff options
author | Linnea Gräf <nea@nea.moe> | 2025-04-01 01:37:55 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-04-01 01:37:55 +0200 |
commit | bda040c6c2cc77c9c1a06a61b2f13548d28d76ec (patch) | |
tree | 3c48dc96cfd74a6a7d167e45eaccca0bec74fb12 /src/main/kotlin/util/render/FirmamentShaders.kt | |
parent | 4f4652bb0d50dfd37297a573ad73ef9cd1a8e92d (diff) | |
download | Firmament-mc1.21.5.tar.gz Firmament-mc1.21.5.tar.bz2 Firmament-mc1.21.5.zip |
WIP: Port some 1.21.5 thingsmc1.21.5
Diffstat (limited to 'src/main/kotlin/util/render/FirmamentShaders.kt')
-rw-r--r-- | src/main/kotlin/util/render/FirmamentShaders.kt | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/main/kotlin/util/render/FirmamentShaders.kt b/src/main/kotlin/util/render/FirmamentShaders.kt index ba67dbb..cc6cd49 100644 --- a/src/main/kotlin/util/render/FirmamentShaders.kt +++ b/src/main/kotlin/util/render/FirmamentShaders.kt @@ -1,9 +1,10 @@ package moe.nea.firmament.util.render +import com.mojang.blaze3d.vertex.VertexFormat +import net.minecraft.client.gl.CompiledShader import net.minecraft.client.gl.Defines -import net.minecraft.client.gl.ShaderProgramKey +import net.minecraft.client.gl.ShaderProgram import net.minecraft.client.render.RenderPhase -import net.minecraft.client.render.VertexFormat import net.minecraft.client.render.VertexFormats import moe.nea.firmament.Firmament import moe.nea.firmament.annotations.Subscribe @@ -11,20 +12,9 @@ import moe.nea.firmament.events.DebugInstantiateEvent import moe.nea.firmament.util.MC object FirmamentShaders { - val shaders = mutableListOf<ShaderProgramKey>() - - private fun shader(name: String, format: VertexFormat, defines: Defines): ShaderProgramKey { - val key = ShaderProgramKey(Firmament.identifier(name), format, defines) - shaders.add(key) - return key - } - - val LINES = RenderPhase.ShaderProgram(shader("core/rendertype_lines", VertexFormats.LINES, Defines.EMPTY)) @Subscribe fun debugLoad(event: DebugInstantiateEvent) { - shaders.forEach { - MC.instance.shaderLoader.getOrCreateProgram(it) - } + // TODO: do i still need to work with shaders like this? } } |