fix: Some rendering issues

This commit is contained in:
Linnea Gräf
2025-04-09 20:12:10 +02:00
parent 7a3271dfd2
commit 5d36586e5f

View File

@@ -22,11 +22,22 @@ object CustomRenderPipelines {
.withCull(false) .withCull(false)
.withDepthWrite(false) .withDepthWrite(false)
.build() .build()
val COLORED_OMNIPRESENT_QUADS = RenderPipeline.builder(RenderPipelines.ENTITY_SNIPPET)// TODO: split this up to support better transparent ordering. val OMNIPRESENT_LINES = RenderPipeline
.withLocation(Firmament.identifier("colored_omnipresent_quads")) .builder(RenderPipelines.RENDERTYPE_LINES_SNIPPET)
.withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) .withLocation(Firmament.identifier("lines"))
.withDepthWrite(false) .withDepthWrite(false)
.withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST)
.build() .build()
val COLORED_OMNIPRESENT_QUADS =
RenderPipeline.builder(RenderPipelines.MATRICES_COLOR_SNIPPET)// TODO: split this up to support better transparent ordering.
.withLocation(Firmament.identifier("colored_omnipresent_quads"))
.withVertexShader("core/position_color")
.withFragmentShader("core/position_color")
.withVertexFormat(VertexFormats.POSITION_COLOR, DrawMode.QUADS)
.withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST)
.withCull(false)
.withDepthWrite(false)
.build()
} }
object CustomRenderLayers { object CustomRenderLayers {
@@ -48,8 +59,8 @@ object CustomRenderLayers {
val LINES = RenderLayer.of( val LINES = RenderLayer.of(
"firmament_lines", "firmament_lines",
RenderLayer.DEFAULT_BUFFER_SIZE, RenderLayer.DEFAULT_BUFFER_SIZE,
RenderPipelines.LINES, CustomRenderPipelines.OMNIPRESENT_LINES,
RenderLayer.MultiPhaseParameters.builder() RenderLayer.MultiPhaseParameters.builder() // TODO: accept linewidth here
.build(false) .build(false)
) )
val COLORED_QUADS = RenderLayer.of( val COLORED_QUADS = RenderLayer.of(
@@ -57,6 +68,7 @@ object CustomRenderLayers {
RenderLayer.DEFAULT_BUFFER_SIZE, RenderLayer.DEFAULT_BUFFER_SIZE,
CustomRenderPipelines.COLORED_OMNIPRESENT_QUADS, CustomRenderPipelines.COLORED_OMNIPRESENT_QUADS,
RenderLayer.MultiPhaseParameters.builder() RenderLayer.MultiPhaseParameters.builder()
.lightmap(RenderPhase.DISABLE_LIGHTMAP)
.build(false) .build(false)
) )
} }