Search in sources :

Example 1 with Vector3f

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());
    }
}
Also used : Vector3f(net.coderbot.iris.vendored.joml.Vector3f)

Example 2 with Vector3f

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;
    });
}
Also used : Vector3d(net.coderbot.iris.vendored.joml.Vector3d) Vector3f(net.coderbot.iris.vendored.joml.Vector3f)

Example 3 with Vector3f

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;
    });
}
Also used : Vector4f(net.coderbot.iris.vendored.joml.Vector4f) Vector3f(net.coderbot.iris.vendored.joml.Vector3f)

Aggregations

Vector3f (net.coderbot.iris.vendored.joml.Vector3f)3 Vector3d (net.coderbot.iris.vendored.joml.Vector3d)1 Vector4f (net.coderbot.iris.vendored.joml.Vector4f)1