use of net.coderbot.iris.vendored.joml.Vector3f in project Iris by IrisShaders.
the class Vector3Uniform method update.
@Override
public void update() {
Vector3f newValue = value.get();
if (!newValue.equals(cachedValue)) {
cachedValue.set(newValue.x(), newValue.y(), newValue.z());
IrisRenderSystem.uniform3f(location, cachedValue.x(), cachedValue.y(), cachedValue.z());
}
}
use of net.coderbot.iris.vendored.joml.Vector3f in project Iris by IrisShaders.
the class Vector3Uniform method converted.
static Vector3Uniform converted(int location, Supplier<Vector3d> value) {
Vector3f held = new Vector3f();
return new Vector3Uniform(location, () -> {
Vector3d updated = value.get();
held.set((float) updated.x, (float) updated.y, (float) updated.z);
return held;
});
}
use of net.coderbot.iris.vendored.joml.Vector3f in project Iris by IrisShaders.
the class Vector3Uniform method truncated.
static Vector3Uniform truncated(int location, Supplier<Vector4f> value) {
Vector3f held = new Vector3f();
return new Vector3Uniform(location, () -> {
Vector4f updated = value.get();
held.set(updated.x(), updated.y(), updated.z());
return held;
});
}