mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-20 20:32:14 +00:00
* Beta, maybe * Fixes for entityColor uniform in Iris * Handle Iris Texture input hook properly in GLSM * Iris Entity Fixes * Gbuffer progress * Wire up BlockEntity gbuffer * Move Entity gbuffer to a more appropriate place to avoid reentrancy * Wire up ENTITY_EYES and BEACOM_BEAM * Clean up unused RenderStateShard files * This seems marginally more correct? * Fix shadows from showing on sides of blocks * Remove overlay * yeet * More gl debugging * Grr, fix water textures * Add missed enable checks * Workaround for unset depth texture when using apitrace... Use a WrapOperation instead of an Inject with local capture - it wasn't working in dev w/ mixin debug set * update bs * Fix crosshair rendering with shaders * more final * Disable dynamic lights if shaders are in use * No light when in water * Add Void Particle Option + Mixin cleanup * update bs * less false --------- Co-authored-by: Darren Eberly <[email protected]> Co-authored-by: Caedis <[email protected]>
66 lines
1.6 KiB
Java
66 lines
1.6 KiB
Java
package net.coderbot.iris.uniforms;
|
|
|
|
import lombok.Getter;
|
|
import net.coderbot.iris.gl.state.ValueUpdateNotifier;
|
|
|
|
import org.joml.Vector4f;
|
|
|
|
public class CapturedRenderingState {
|
|
public static final CapturedRenderingState INSTANCE = new CapturedRenderingState();
|
|
|
|
@Getter
|
|
private float tickDelta;
|
|
@Getter
|
|
private int currentRenderedBlockEntity;
|
|
private Runnable blockEntityIdListener = null;
|
|
|
|
@Getter
|
|
private int currentRenderedEntity = -1;
|
|
private Runnable entityIdListener = null;
|
|
|
|
@Getter
|
|
private final Vector4f currentEntityColor = new Vector4f();
|
|
private Runnable entityColorListener = null;
|
|
|
|
private CapturedRenderingState() {
|
|
}
|
|
|
|
public void setTickDelta(float tickDelta) {
|
|
this.tickDelta = tickDelta;
|
|
}
|
|
|
|
public void setCurrentBlockEntity(int entity) {
|
|
this.currentRenderedBlockEntity = entity;
|
|
|
|
if (this.blockEntityIdListener != null) {
|
|
this.blockEntityIdListener.run();
|
|
}
|
|
}
|
|
|
|
public void setCurrentEntity(int entity) {
|
|
this.currentRenderedEntity = entity;
|
|
|
|
if (this.entityIdListener != null) {
|
|
this.entityIdListener.run();
|
|
}
|
|
}
|
|
|
|
public void setCurrentEntityColor(float r, float g, float b, float a) {
|
|
this.currentEntityColor.set(r, g, b, a);
|
|
|
|
if (this.entityColorListener != null) {
|
|
this.entityColorListener.run();
|
|
}
|
|
}
|
|
|
|
public ValueUpdateNotifier getEntityIdNotifier() {
|
|
return listener -> this.entityIdListener = listener;
|
|
}
|
|
|
|
public ValueUpdateNotifier getBlockEntityIdNotifier() {
|
|
return listener -> this.blockEntityIdListener = listener;
|
|
}
|
|
|
|
public ValueUpdateNotifier getEntityColorNotifier() { return listener -> this.entityColorListener = listener; }
|
|
}
|