aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/util/render/CustomRenderLayers.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-04-09 20:12:10 +0200
committerLinnea Gräf <nea@nea.moe>2025-05-05 00:17:09 +0200
commit5d36586e5f188625dbba73b4076ccbff2f2bc675 (patch)
tree8793d90cbca14f7f3bcb41f774c312e38f4ebbdd /src/main/kotlin/util/render/CustomRenderLayers.kt
parent7a3271dfd2541133da8a342185c798b320a45296 (diff)
downloadFirmament-5d36586e5f188625dbba73b4076ccbff2f2bc675.tar.gz
Firmament-5d36586e5f188625dbba73b4076ccbff2f2bc675.tar.bz2
Firmament-5d36586e5f188625dbba73b4076ccbff2f2bc675.zip
fix: Some rendering issues
Diffstat (limited to 'src/main/kotlin/util/render/CustomRenderLayers.kt')
-rw-r--r--src/main/kotlin/util/render/CustomRenderLayers.kt22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/main/kotlin/util/render/CustomRenderLayers.kt b/src/main/kotlin/util/render/CustomRenderLayers.kt
index cdd7013..7f3cdec 100644
--- a/src/main/kotlin/util/render/CustomRenderLayers.kt
+++ b/src/main/kotlin/util/render/CustomRenderLayers.kt
@@ -22,11 +22,22 @@ object CustomRenderPipelines {
.withCull(false)
.withDepthWrite(false)
.build()
- val COLORED_OMNIPRESENT_QUADS = RenderPipeline.builder(RenderPipelines.ENTITY_SNIPPET)// TODO: split this up to support better transparent ordering.
- .withLocation(Firmament.identifier("colored_omnipresent_quads"))
- .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST)
+ val OMNIPRESENT_LINES = RenderPipeline
+ .builder(RenderPipelines.RENDERTYPE_LINES_SNIPPET)
+ .withLocation(Firmament.identifier("lines"))
.withDepthWrite(false)
+ .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST)
.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 {
@@ -48,8 +59,8 @@ object CustomRenderLayers {
val LINES = RenderLayer.of(
"firmament_lines",
RenderLayer.DEFAULT_BUFFER_SIZE,
- RenderPipelines.LINES,
- RenderLayer.MultiPhaseParameters.builder()
+ CustomRenderPipelines.OMNIPRESENT_LINES,
+ RenderLayer.MultiPhaseParameters.builder() // TODO: accept linewidth here
.build(false)
)
val COLORED_QUADS = RenderLayer.of(
@@ -57,6 +68,7 @@ object CustomRenderLayers {
RenderLayer.DEFAULT_BUFFER_SIZE,
CustomRenderPipelines.COLORED_OMNIPRESENT_QUADS,
RenderLayer.MultiPhaseParameters.builder()
+ .lightmap(RenderPhase.DISABLE_LIGHTMAP)
.build(false)
)
}