mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-19 20:09:39 +00:00
Various Mixin-related Fixes (#890)
* Update deps * Remove dead code * Add missing `@Override` annotations * Fix generics * Add `serialVersionUID`s * Address deprecation warnings * Use `@WrapWithCondition` v2 * Misc cleanup * Use AccessTransformers if possible * Fix mixin conflicts * Add `@Mutable` annotations * Fix injection targets * Update deps
This commit is contained in:
1 parent
611bbf02c8
commit
bb5526598e
158 files changed
+252
-619
No files matched your search
@@ -1,7 +1,6 @@
|
||||
package net.coderbot.iris.vertices;
|
||||
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Math;
|
||||
|
||||
/**
|
||||
* Provides some utilities for working with packed normal vectors. Each normal component provides 8 bits of
|
||||
@@ -54,15 +53,6 @@ public class NormI8 {
|
||||
return ((int) (x * 127) & 0xFF) | (((int) (y * 127) & 0xFF) << 8) | (((int) (z * 127) & 0xFF) << 16) | (((int) w & 0xFF) << 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes a float in the range of -1.0..1.0 to a normalized unsigned integer in the range of 0..255 which can then
|
||||
* be passed to graphics memory.
|
||||
*/
|
||||
private static int encode(float comp) {
|
||||
// TODO: is the clamp necessary here? our inputs should always be normalized vector components
|
||||
return ((int) (Math.clamp(comp, -1.0F, 1.0F) * COMPONENT_RANGE) & 255);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unpacks the x-component of the packed normal, denormalizing it to a float in the range of -1.0..1.0.
|
||||
* @param norm The packed normal
|
||||
|
||||
Reference in new issue
Block a user