mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-27 23:47:09 +01:00
Update changelog and remove dead QuaternionTransformStack.java
This commit is contained in:
parent
e20612cd30
commit
5f7093fa0e
2 changed files with 27 additions and 95 deletions
|
@ -1,3 +1,30 @@
|
||||||
|
0.2.0:
|
||||||
|
New
|
||||||
|
- Flywheel driven shulker box rendering
|
||||||
|
- Optimize chunk accesses by caching previous result
|
||||||
|
- Further optimize flywheel rendered objects through parallel updates
|
||||||
|
Changes
|
||||||
|
- Distant objects are update throttled according to the sequence of prime numbers, smoothing out updates
|
||||||
|
- Rename normalOverlay to debugNormals, make naming consistent across command and config
|
||||||
|
Fixes
|
||||||
|
- Fix issue causing modded banner patterns to all have missing textures
|
||||||
|
Technical/API
|
||||||
|
- Reorganize, simplify, and document everything in the MaterialManager tree
|
||||||
|
- MaterialManagers associate RenderStates with MaterialGroups
|
||||||
|
- Proper support for rendering in different layers (SOLID, CUTOUT, and TRANSPARENT)
|
||||||
|
- New methods in MaterialManager to accommodate these changes
|
||||||
|
- Deprecate old functions in MaterialManager in favor of new ones using MaterialGroups
|
||||||
|
- InstanceDatas can be transferred to other Instancers via "instance stealing"
|
||||||
|
- Abstraction for models, IModel
|
||||||
|
- Easier to use, and gives Flywheel more freedom to optimize
|
||||||
|
- Buffered models directly consume IModels
|
||||||
|
- Added BlockModel, renders a single block
|
||||||
|
- Added WorldModel, renders many blocks given a world instance
|
||||||
|
- Cuboids can be inverted across Y and Z, used by many vanilla models for some reason
|
||||||
|
- TransformStack scaling
|
||||||
|
- VecBuffer coloring
|
||||||
|
- Add more information to RenderLayerEvent and BeginFrameEvent
|
||||||
|
|
||||||
0.1.1:
|
0.1.1:
|
||||||
New
|
New
|
||||||
- Flywheel driven chest and bell rendering, ~20x performance improvement in contrived cases
|
- Flywheel driven chest and bell rendering, ~20x performance improvement in contrived cases
|
||||||
|
|
|
@ -1,95 +0,0 @@
|
||||||
package com.jozufozu.flywheel.util.transform;
|
|
||||||
|
|
||||||
import java.util.ArrayDeque;
|
|
||||||
import java.util.Deque;
|
|
||||||
|
|
||||||
import net.minecraft.util.math.vector.Quaternion;
|
|
||||||
|
|
||||||
public class QuaternionTransformStack implements TransformStack {
|
|
||||||
|
|
||||||
private final Deque<Transform> stack;
|
|
||||||
|
|
||||||
public QuaternionTransformStack() {
|
|
||||||
stack = new ArrayDeque<>();
|
|
||||||
stack.add(new Transform());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TransformStack translate(double x, double y, double z) {
|
|
||||||
|
|
||||||
Transform peek = stack.peek();
|
|
||||||
|
|
||||||
double qx = peek.qx;
|
|
||||||
double qy = peek.qy;
|
|
||||||
double qz = peek.qz;
|
|
||||||
double qw = peek.qw;
|
|
||||||
peek.x += qw * x + qy * z - qz * y;
|
|
||||||
peek.y += qw * y - qx * z + qz * x;
|
|
||||||
peek.z += qw * z + qx * y - qy * x;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TransformStack multiply(Quaternion quaternion) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TransformStack push() {
|
|
||||||
stack.push(stack.peek().copy());
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TransformStack scale(float factor) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TransformStack pop() {
|
|
||||||
|
|
||||||
if (stack.size() == 1) {
|
|
||||||
stack.peek().loadIdentity();
|
|
||||||
} else {
|
|
||||||
stack.pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class Transform {
|
|
||||||
public double qx;
|
|
||||||
public double qy;
|
|
||||||
public double qz;
|
|
||||||
public double qw;
|
|
||||||
public double x;
|
|
||||||
public double y;
|
|
||||||
public double z;
|
|
||||||
|
|
||||||
public Transform() {
|
|
||||||
qw = 1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void loadIdentity() {
|
|
||||||
x = y = z = 0.0;
|
|
||||||
|
|
||||||
qx = qy = qz = 0.0;
|
|
||||||
qw = 1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Transform copy() {
|
|
||||||
Transform transform = new Transform();
|
|
||||||
|
|
||||||
transform.qx = this.qx;
|
|
||||||
transform.qy = this.qy;
|
|
||||||
transform.qz = this.qz;
|
|
||||||
transform.qw = this.qw;
|
|
||||||
transform.x = this.x;
|
|
||||||
transform.y = this.y;
|
|
||||||
transform.z = this.z;
|
|
||||||
|
|
||||||
return transform;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue