@@ -3,11 +3,13 @@ package util.render
33import com.mojang.blaze3d.pipeline.BlendFunction
44import com.mojang.blaze3d.pipeline.RenderPipeline
55import com.mojang.blaze3d.platform.DepthTestFunction
6+ import com.mojang.blaze3d.shaders.UniformType
7+ import com.mojang.blaze3d.vertex.DefaultVertexFormat
68import com.mojang.blaze3d.vertex.VertexFormat.Mode
79import java.util.function.Function
810import net.minecraft.client.renderer.RenderPipelines
9- import com.mojang.blaze3d.shaders.UniformType
10- import com.mojang.blaze3d.vertex.DefaultVertexFormat
11+ import net.minecraft.client.renderer.rendertype.LayeringTransform
12+ import net.minecraft.client.renderer.rendertype.OutputTarget
1113import net.minecraft.client.renderer.rendertype.RenderSetup
1214import net.minecraft.client.renderer.rendertype.RenderType
1315import net.minecraft.resources.Identifier
@@ -23,12 +25,6 @@ object CustomRenderPipelines {
2325 .withCull(false )
2426 .withDepthWrite(false )
2527 .build()
26- val OMNIPRESENT_LINES = RenderPipeline
27- .builder(RenderPipelines .LINES_SNIPPET )
28- .withLocation(Firmament .identifier(" lines" ))
29- .withDepthWrite(false )
30- .withDepthTestFunction(DepthTestFunction .NO_DEPTH_TEST )
31- .build()
3228 val COLORED_OMNIPRESENT_QUADS =
3329 RenderPipeline .builder(RenderPipelines .MATRICES_PROJECTION_SNIPPET )// TODO: split this up to support better transparent ordering.
3430 .withLocation(Firmament .identifier(" colored_omnipresent_quads" ))
@@ -58,6 +54,11 @@ object CustomRenderPipelines {
5854 .withSampler(" Sampler3" )
5955 .withUniform(" Animation" , UniformType .UNIFORM_BUFFER )
6056 .build()
57+ val OMNIPRESENT_LINES = RenderPipeline .builder(RenderPipelines .LINES_SNIPPET )
58+ .withDepthTestFunction(DepthTestFunction .NO_DEPTH_TEST )
59+ .withLocation(Firmament .identifier(" lines" ))
60+ .withDepthWrite(false )
61+ .withLocation(" pipeline/lines" ).build()
6162}
6263
6364object CustomRenderLayers {
@@ -91,6 +92,14 @@ object CustomRenderLayers {
9192 .createRenderSetup()
9293 )
9394
95+ val LINES_NO_DEPTH = RenderType .create(
96+ " firmament_lines_no_depth" ,
97+ RenderSetup .builder(CustomRenderPipelines .OMNIPRESENT_LINES )
98+ .setLayeringTransform(LayeringTransform .VIEW_OFFSET_Z_LAYERING )
99+ .setOutputTarget(OutputTarget .ITEM_ENTITY_TARGET )
100+ .createRenderSetup()
101+ )
102+
94103 val TRANSLUCENT_CIRCLE_GUI =
95104 RenderType .create(
96105 " firmament_translucent_circle_gui" ,
0 commit comments