NormalHelper

public abstract class NormalHelper

Static routines of general utility for renderer implementations. Renderers are not required to use these helpers, but they were designed to be usable without the default renderer.

Functions

computeFaceNormal
Link copied to clipboard
static void computeFaceNormal(@NotNull() Vec3f saveTo, QuadView q)
Computes the face normal of the given quad and saves it in the provided non-null vector.
getPackedNormalComponent
Link copied to clipboard
static float getPackedNormalComponent(int packedNormal, int component)
Retrieves values packed by packNormal.
packNormal
Link copied to clipboard
static int packNormal(Vec3f normal, float w)
Version of packNormal that accepts a vector type.
static int packNormal(float x, float y, float z, float w)
Stores a normal plus an extra value as a quartet of signed bytes.This is the same normal format that vanilla item rendering expects.The extra value is for use by shaders.

Sources

jvm source
Link copied to clipboard