Class SmoothQuadLighter
java.lang.Object
net.neoforged.neoforge.client.model.lighting.QuadLighter
net.neoforged.neoforge.client.model.lighting.SmoothQuadLighter
Implementation of
QuadLighter
that lights baked quads
using ambient occlusion and
light interpolation.-
Field Summary
Modifier and TypeFieldDescriptionprivate final float[][][]
private final int[][][]
private final float[][][][]
private final BlockPos.MutableBlockPos
private final int[][][]
private static final Direction[]
private final float[][][][]
private final boolean[][][]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected float
calcLightmap
(float[][][][] light, float x, float y, float z) protected float
calculateBrightness
(float[] position) protected int
calculateLightmap
(float[] position, byte[] normal) private float
combine
(int c, int s1, int s2, int s3, boolean t0, boolean t1, boolean t2, boolean t3) protected void
computeLightingAt
(BlockAndTintGetter level, BlockPos origin, BlockState state) Methods inherited from class net.neoforged.neoforge.client.model.lighting.QuadLighter
calculateShade, computeLightingForQuad, getComputedBrightness, getComputedLightmap, process, reset, setup
-
Field Details
-
SIDES
-
pos
-
t
private final boolean[][][] t -
s
private final int[][][] s -
b
private final int[][][] b -
skyLight
private final float[][][][] skyLight -
blockLight
private final float[][][][] blockLight -
ao
private final float[][][] ao
-
-
Constructor Details
-
SmoothQuadLighter
-
-
Method Details
-
computeLightingAt
- Specified by:
computeLightingAt
in classQuadLighter
-
calculateBrightness
protected float calculateBrightness(float[] position) - Specified by:
calculateBrightness
in classQuadLighter
-
calculateLightmap
protected int calculateLightmap(float[] position, byte[] normal) - Specified by:
calculateLightmap
in classQuadLighter
-
combine
private float combine(int c, int s1, int s2, int s3, boolean t0, boolean t1, boolean t2, boolean t3) -
calcLightmap
protected float calcLightmap(float[][][][] light, float x, float y, float z)
-