VulkanShader_1.21.10-0.0.4-alpha.jar

Download file
    package net.vulkanmod.render.vertex.format;

public abstract class I32_SNorm {
   private static final float NORM_INV = 0.007874016F;

   public static int packNormal(float x, float y, float z) {
      x *= 127.0F;
      y *= 127.0F;
      z *= 127.0F;
      return (int)x & 255 | ((int)y & 255) << 8 | ((int)z & 255) << 16;
   }

   public static int packNormal(int x, int y, int z) {
      return x & 255 | (y & 255) << 8 | (z & 255) << 16;
   }

   public static float unpackX(int i) {
      return (float)((byte)(i & 255)) * 0.007874016F;
   }

   public static float unpackY(int i) {
      return (float)((byte)(i >> 8 & 255)) * 0.007874016F;
   }

   public static float unpackZ(int i) {
      return (float)((byte)(i >> 16 & 255)) * 0.007874016F;
   }
}
    
Download file