Support for custom uniforms (#902)

* wip backport of custom uniforms

* Functioning custom uniforms maybe?

* Workon separating dynamic/non-dynamic uniforms and making variables available to custom uniforms (currently the JVM dies horribly)

* wip

* It no longer crashes horrifically

* star imports
This commit is contained in:
Darren Eberly authored and GitHub committed 2025-03-18 10:04:31 -07:00
1 parent 6fa973dbc8
commit bed724ba59
89 files changed
+4622 -266

No files matched your search

@@ -57,12 +57,15 @@ public final class ComputeProgram extends GlResource {
return cachedWorkGroups;
}
public void dispatch(float width, float height) {
GL20.glUseProgram(getGlId());
uniforms.update();
samplers.update();
images.update();
public void use() {
GL20.glUseProgram(getGlId());
uniforms.update();
samplers.update();
images.update();
}
public void dispatch(float width, float height) {
if (!Iris.getPipelineManager().getPipeline().map(WorldRenderingPipeline::allowConcurrentCompute).orElse(false)) {
RenderSystem.memoryBarrier(40);
}