Zergatul
Zergatul
TIPThe Iris Project
Created by Zergatul on 1/6/2024 in #iris-issues
Drawing lines on the screen on WorldRenderEvents.LAST
When I enable shaders, lines rendering works with below code (but it looks like my lines are affected by postprocessing shaders):
var buffer = Tesselator.getInstance().getBuilder();
buffer.begin(VertexFormat.Mode.DEBUG_LINES, DefaultVertexFormat.POSITION_COLOR);
buffer.vertex(x, y, z).color(r, g, b, a).endVertex();
// other vertexes
vertexBuffer.drawWithShader(modelViewMatrix, projectionMatrix, GameRenderer.getPositionColorShader());
VertexBuffer.unbind();
var buffer = Tesselator.getInstance().getBuilder();
buffer.begin(VertexFormat.Mode.DEBUG_LINES, DefaultVertexFormat.POSITION_COLOR);
buffer.vertex(x, y, z).color(r, g, b, a).endVertex();
// other vertexes
vertexBuffer.drawWithShader(modelViewMatrix, projectionMatrix, GameRenderer.getPositionColorShader());
VertexBuffer.unbind();
However when I use my own custom lines renderer with my own shaders - nothing is rendered. It is very basic code with compiling shaders, creating program, VBO/VAO, uploading buffer, GL30.glDrawArrays(GL30.GL_LINES, 0, buffer.vertices());, etc Any idea why my low level code doesn't draw anything?
13 replies