Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
f3757f6
Global toggle sounds
bladekt Aug 8, 2024
65751e3
Tickshift improvements
bladekt Aug 10, 2024
a35ffa0
Merge branch 'master' into feature/renderer
emyfops Aug 20, 2024
81a0c63
various performance tweaks (3x faster load time)
emyfops Aug 21, 2024
ea972be
todo: pixel buffer object
emyfops Aug 22, 2024
c6328ca
pixel n-buffer object
emyfops Aug 22, 2024
7f35a62
handle empty pbos
emyfops Aug 22, 2024
1bba654
test: streaming to pbo
emyfops Aug 23, 2024
06aba2d
added upload record time
emyfops Aug 24, 2024
68b24da
added debug gremedy labels
emyfops Aug 24, 2024
12e2045
better pbo
emyfops Aug 24, 2024
7cbfd14
better handling
emyfops Aug 24, 2024
a130c8c
removed videos
emyfops Aug 24, 2024
bbd705f
added documentation for pbo
emyfops Aug 24, 2024
4b96556
moved the fbo down one level
emyfops Aug 24, 2024
895a069
removed loader phase time measure
emyfops Aug 24, 2024
ca72b9a
Merge branch 'master' into feature/renderer
emyfops Aug 24, 2024
0644c69
Update build.gradle.kts
emyfops Aug 24, 2024
de3bb6e
TickEvent KDocs
Avanatiker Aug 25, 2024
b40b1ae
Smol refac
Avanatiker Aug 25, 2024
dcf244d
Better logging and remove texture settings
Avanatiker Aug 25, 2024
c97a29c
Introduce constants for texture options
Avanatiker Aug 25, 2024
009f5c1
Merge branch 'master' into feature/renderer
emyfops Sep 22, 2024
47dbf6c
test: video rendering
emyfops Sep 26, 2024
8014bd0
feature: pbo synchronization
emyfops Sep 26, 2024
a8152e9
ref: use 24 bytes for pixel data
emyfops Sep 27, 2024
fac7070
added renderdoc task
emyfops Sep 27, 2024
9da7aac
open bind function
emyfops Sep 27, 2024
d21cc87
added error checks and handling
emyfops Sep 27, 2024
4ed152f
fix: texture buffer binding
emyfops Sep 29, 2024
68fe8e4
refactor: dedicated decoding class
emyfops Oct 1, 2024
a3e0802
refactor: vertex pipeline
emyfops Oct 13, 2024
e3c8a8a
ref: buffer check and ebo fix
emyfops Oct 14, 2024
b471b39
renamed vpipeline variables names
emyfops Oct 14, 2024
b06eba0
fix: minecraft buffer overwrite
emyfops Oct 14, 2024
593fffb
fix: glMapBufferRange returns null
emyfops Oct 18, 2024
8084071
Merge branch 'master' into feature/video
emyfops Oct 19, 2024
2f80a53
unused
emyfops Oct 19, 2024
3ff6bc6
ref: memory utils
emyfops Oct 19, 2024
fface98
fix: byte conversion
emyfops Oct 19, 2024
807b5d2
ref: buffer growth
emyfops Oct 19, 2024
916e0a8
Merge branch 'master' into feature/video
emyfops Oct 23, 2024
97c43cf
Merge branch 'master' into feature/video
emyfops Oct 23, 2024
ff8d28e
copyright notices
emyfops Oct 23, 2024
04f091e
Merge branch 'master' into feature/video
emyfops Oct 23, 2024
7b37548
ignore unchecked cast
emyfops Oct 23, 2024
beddf73
ref: buffer orphaning over mapping
emyfops Oct 27, 2024
33b291d
fix: wrong vertex attributes
emyfops Oct 31, 2024
aa9c7ce
added glBufferStorage option
emyfops Oct 31, 2024
ec2e9d8
check for buffer access flags
emyfops Oct 31, 2024
892b0cd
fix: chunk update in render thread
emyfops Oct 31, 2024
b4f4367
removed unused library
emyfops Oct 31, 2024
7c7449a
Merge branch 'master' into feature/video
emyfops Nov 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import org.gradle.internal.jvm.*
import net.fabricmc.loom.api.LoomGradleExtensionAPI
import org.apache.tools.ant.taskdefs.condition.Os
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.io.FileNotFoundException
import java.util.*

val modId: String by project
Expand Down Expand Up @@ -66,6 +69,17 @@ subprojects {
if (path == ":common") return@subprojects

tasks {
register<Exec>("renderDoc") {
val javaHome = Jvm.current().javaHome
val gradleWrapper = rootProject.tasks.wrapper.get().jarFile.absolutePath

commandLine = listOf(
findExecutable("renderdoccmd")
?: throw FileNotFoundException("Could not find the renderdoccmd executable"),
"capture", /* Remove the following 2 lines if you don't want api validation */ "--opt-api-validation", "--opt-api-validation-unmute", "--opt-hook-children", "--wait-for-exit", "--working-dir", ".", "$javaHome/bin/java", "-Xmx64m", "-Xms64m", /*"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005",*/ "-Dorg.gradle.appname=gradlew", "-Dorg.gradle.java.home=$javaHome", "-classpath", gradleWrapper, "org.gradle.wrapper.GradleWrapperMain", "${this@subprojects.path}:runClient",
)
}

processResources {
// Replaces placeholders in the mod info files
filesMatching(targets) {
Expand Down Expand Up @@ -118,3 +132,10 @@ allprojects {
}
}
}

private fun findExecutable(executable: String): String? {
val isWindows = Os.isFamily(Os.FAMILY_WINDOWS)
val cmd = if (isWindows) "where" else "which"

return ProcessBuilder(cmd, executable).start().inputStream.bufferedReader().readText().trim().takeIf { it.isNotBlank() }
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package com.lambda.mixin.render;

import com.lambda.graphics.gl.VaoUtils;
import com.lambda.graphics.buffer.vertex.ElementBuffer;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.gl.VertexBuffer;
import net.minecraft.client.render.BufferBuilder;
Expand All @@ -37,6 +37,6 @@ public class VertexBufferMixin {
@Inject(method = "uploadIndexBuffer", at = @At("RETURN"))
private void onConfigureIndexBuffer(BufferBuilder.DrawParameters parameters, ByteBuffer vertexBuffer, CallbackInfoReturnable<RenderSystem.ShapeIndexBuffer> cir) {
RenderSystem.ShapeIndexBuffer value = cir.getReturnValue();
VaoUtils.lastIbo = value == null ? this.indexBufferId : value.id;
ElementBuffer.lastIbo = value == null ? this.indexBufferId : value.id;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
package com.lambda.graphics.animation

import com.lambda.Lambda.mc
import com.lambda.util.math.lerp
import com.lambda.util.extension.partialTicks
import com.lambda.util.math.lerp
import kotlin.math.abs
import kotlin.reflect.KProperty

Expand Down
29 changes: 0 additions & 29 deletions common/src/main/kotlin/com/lambda/graphics/buffer/BufferUsage.kt

This file was deleted.

15 changes: 7 additions & 8 deletions common/src/main/kotlin/com/lambda/graphics/buffer/FrameBuffer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ package com.lambda.graphics.buffer

import com.lambda.Lambda.mc
import com.lambda.graphics.RenderMain
import com.lambda.graphics.buffer.vao.VAO
import com.lambda.graphics.buffer.vao.vertex.VertexAttrib
import com.lambda.graphics.buffer.vao.vertex.VertexMode
import com.lambda.graphics.buffer.vertex.attributes.VertexAttrib
import com.lambda.graphics.buffer.vertex.attributes.VertexMode
import com.lambda.graphics.gl.GlStateUtils.withBlendFunc
import com.lambda.graphics.shader.Shader
import com.lambda.graphics.texture.TextureUtils.bindTexture
Expand Down Expand Up @@ -67,7 +66,7 @@ class FrameBuffer(private val depth: Boolean = false) {
shader.use()
shaderBlock(shader)

vao.use {
pipeline.use {
grow(4)

val uv1 = pos1 / RenderMain.screenSize
Expand All @@ -82,9 +81,9 @@ class FrameBuffer(private val depth: Boolean = false) {
}

withBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA) {
vao.upload()
vao.render()
vao.clear()
pipeline.upload()
pipeline.render()
pipeline.clear()
}

return this
Expand Down Expand Up @@ -149,7 +148,7 @@ class FrameBuffer(private val depth: Boolean = false) {
}

companion object {
private val vao = VAO(VertexMode.TRIANGLES, VertexAttrib.Group.POS_UV)
private val pipeline = VertexPipeline(VertexMode.TRIANGLES, VertexAttrib.Group.POS_UV)
private var lastFrameBuffer: Int? = null
}
}
Loading