mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 00:07:45 +00:00
Fix vertex lighter using stale normal data (#4917)
This commit is contained in:
1 parent
fa50d98357
commit
7258beeede
1 file changed
+5
-5
@@ -121,14 +121,14 @@ public class VertexLighterFlat extends QuadGatheringTransformer
|
||||
float[][] lightmap = quadData[lightmapIndex];
|
||||
float[][] color = quadData[colorIndex];
|
||||
|
||||
// If all three normal values are either -1 or 0, normals must be generated
|
||||
if(quadData[normalIndex][0][0] != quadData[normalIndex][0][1] ||
|
||||
quadData[normalIndex][0][1] != quadData[normalIndex][0][2] ||
|
||||
(quadData[normalIndex][0][0] != -1 && quadData[normalIndex][0][0] != 0))
|
||||
if (dataLength[normalIndex] >= 3
|
||||
&& (quadData[normalIndex][0][0] != -1
|
||||
|| quadData[normalIndex][0][1] != -1
|
||||
|| quadData[normalIndex][0][2] != -1))
|
||||
{
|
||||
normal = quadData[normalIndex];
|
||||
}
|
||||
else
|
||||
else // normals must be generated
|
||||
{
|
||||
normal = new float[4][4];
|
||||
Vector3f v1 = new Vector3f(position[3]);
|
||||
|
||||
Reference in new issue
Block a user