This commit is contained in:
ah-OOG-ah committed 2025-10-07 00:07:16 -04:00
1 parent 62dc4c776c
commit e9f6278eb5
3 files changed
+13 -11

No files matched your search

@@ -5,9 +5,9 @@ package com.gtnewhorizon.gtnhlib.client.renderer.cel.api.util;
///
/// |||||
/// | --------- | --------- | --------- | ---------- |
/// | 32 | 24 | 16 | 8 |
/// | 0110 1100 | 0110 1100 | 0110 1100 | 0110 1100 |
/// | Alpha | Blue | Green | Red |
/// | 32 | 24 | 16 | 8 |
/// | 0110 1100 | 0110 1100 | 0110 1100 | 0110 1100 |
/// | Alpha | Blue | Green | Red |
public class ColorABGR implements ColorU8 {
private static final int RED_COMPONENT_OFFSET = 0;
@@ -1,14 +1,15 @@
package com.gtnewhorizon.gtnhlib.client.renderer.cel.api.util;
/// Provides some utilities for packing and unpacking color components from packed integer colors in ARGB format. This
/// packed format is used by most of Minecraft, but special care must be taken to pack it into ABGR format before passing
/// packed format is used by most of Minecraft, but special care must be taken to pack it into ABGR format before
/// passing
/// it to OpenGL attributes.
///
/// |||||
/// | --------- | --------- | --------- | ---------- |
/// | 32 | 24 | 16 | 8 |
/// | 0110 1100 | 0110 1100 | 0110 1100 | 0110 1100 |
/// | Alpha | Red | Green | Blue |
/// | 32 | 24 | 16 | 8 |
/// | 0110 1100 | 0110 1100 | 0110 1100 | 0110 1100 |
/// | Alpha | Red | Green | Blue |
public class ColorARGB implements ColorU8 {
private static final int ALPHA_COMPONENT_OFFSET = 24;
@@ -3,14 +3,15 @@ package com.gtnewhorizon.gtnhlib.client.renderer.cel.api.util;
import org.joml.Math;
import org.joml.Vector3f;
/// Provides some utilities for working with packed normal vectors. Each normal component provides 8 bits of precision in
/// Provides some utilities for working with packed normal vectors. Each normal component provides 8 bits of precision
/// in
/// the range of \[-1.0,1.0].
///
/// |||||
/// | --------- | --------- | --------- | ---------- |
/// | 32 | 24 | 16 | 8 |
/// | 0000 0000 | 0110 1100 | 0110 1100 | 0110 1100 |
/// | Padding | X | Y | Z |
/// | 32 | 24 | 16 | 8 |
/// | 0000 0000 | 0110 1100 | 0110 1100 | 0110 1100 |
/// | Padding | X | Y | Z |
public class NormI8 {
private static final int X_COMPONENT_OFFSET = 0;