# Some normals on my cube are wrong... need help fixing

I’m drawing several cubes.

``````                // Calculate the position of the vertices on the top face.
Vector3 topLeftFront = Position + new Vector3(-1.0f, 1.0f, -1.0f) * Size;
Vector3 topLeftBack = Position + new Vector3(-1.0f, 1.0f, 1.0f) * Size;
Vector3 topRightFront = Position + new Vector3(1.0f, 1.0f, -1.0f) * Size;
Vector3 topRightBack = Position + new Vector3(1.0f, 1.0f, 1.0f) * Size;

// Calculate the position of the vertices on the bottom face.
Vector3 btmLeftFront = Position + new Vector3(-1.0f, -1.0f, -1.0f) * Size;
Vector3 btmLeftBack = Position + new Vector3(-1.0f, -1.0f, 1.0f) * Size;
Vector3 btmRightFront = Position + new Vector3(1.0f, -1.0f, -1.0f) * Size;
Vector3 btmRightBack = Position + new Vector3(1.0f, -1.0f, 1.0f) * Size;

// Normal vectors for each face (needed for lighting / display)
Vector3 normalFront = new Vector3(0.0f, 0.0f, 1.0f);
Vector3 normalBack = new Vector3(0.0f, 0.0f, -1.0f);
Vector3 normalTop = new Vector3(0.0f, 1.0f, 0.0f);
Vector3 normalBottom = new Vector3(0.0f, -1.0f, 0.0f);
Vector3 normalLeft = new Vector3(-1.0f, 0.0f, 0.0f);
Vector3 normalRight = new Vector3(1.0f, 0.0f, 0.0f);

// UV texture coordinates
Vector2 textureTopLeft = new Vector2(1.0f, 0.0f);
Vector2 textureTopRight = new Vector2(0.0f, 0.0f);
Vector2 textureBottomLeft = new Vector2(1.0f, 1.0f);
Vector2 textureBottomRight = new Vector2(0.0f, 1.0f);

VertexPositionNormalTexture[] _vertices = new VertexPositionNormalTexture[36]
{
// Add the vertices for the FRONT face.
new VertexPositionNormalTexture(topLeftFront, normalFront, textureTopLeft),
new VertexPositionNormalTexture(btmLeftFront, normalFront, textureBottomLeft),
new VertexPositionNormalTexture(topRightFront, normalFront, textureTopRight),
new VertexPositionNormalTexture(btmLeftFront, normalFront, textureBottomLeft),
new VertexPositionNormalTexture(btmRightFront, normalFront, textureBottomRight),
new VertexPositionNormalTexture(topRightFront, normalFront, textureTopRight),

// Add the vertices for the BACK face.
new VertexPositionNormalTexture(topLeftBack, normalBack, textureTopRight),
new VertexPositionNormalTexture(topRightBack, normalBack, textureTopLeft),
new VertexPositionNormalTexture(btmLeftBack, normalBack, textureBottomRight),
new VertexPositionNormalTexture(btmLeftBack, normalBack, textureBottomRight),
new VertexPositionNormalTexture(topRightBack, normalBack, textureTopLeft),
new VertexPositionNormalTexture(btmRightBack, normalBack, textureBottomLeft),

// Add the vertices for the TOP face.
new VertexPositionNormalTexture(topLeftFront, normalTop, textureBottomLeft),
new VertexPositionNormalTexture(topRightBack, normalTop, textureTopRight),
new VertexPositionNormalTexture(topLeftBack, normalTop, textureTopLeft),
new VertexPositionNormalTexture(topLeftFront, normalTop, textureBottomLeft),
new VertexPositionNormalTexture(topRightFront, normalTop, textureBottomRight),
new VertexPositionNormalTexture(topRightBack, normalTop, textureTopRight),

// Add the vertices for the BOTTOM face.
new VertexPositionNormalTexture(btmLeftFront, normalBottom, textureTopLeft),
new VertexPositionNormalTexture(btmLeftBack, normalBottom, textureBottomLeft),
new VertexPositionNormalTexture(btmRightBack, normalBottom, textureBottomRight),
new VertexPositionNormalTexture(btmLeftFront, normalBottom, textureTopLeft),
new VertexPositionNormalTexture(btmRightBack, normalBottom, textureBottomRight),
new VertexPositionNormalTexture(btmRightFront, normalBottom, textureTopRight),

// Add the vertices for the LEFT face.
new VertexPositionNormalTexture(topLeftFront, normalLeft, textureTopRight),
new VertexPositionNormalTexture(btmLeftBack, normalLeft, textureBottomLeft),
new VertexPositionNormalTexture(btmLeftFront, normalLeft, textureBottomRight),
new VertexPositionNormalTexture(topLeftBack, normalLeft, textureTopLeft),
new VertexPositionNormalTexture(btmLeftBack, normalLeft, textureBottomLeft),
new VertexPositionNormalTexture(topLeftFront, normalLeft, textureTopRight),

// Add the vertices for the RIGHT face.
new VertexPositionNormalTexture(topRightFront, normalRight, textureTopLeft),
new VertexPositionNormalTexture(btmRightFront, normalRight, textureBottomLeft),
new VertexPositionNormalTexture(btmRightBack, normalRight, textureBottomRight),
new VertexPositionNormalTexture(topRightBack, normalRight, textureTopRight),
new VertexPositionNormalTexture(topRightFront, normalRight, textureTopLeft),
new VertexPositionNormalTexture(btmRightBack, normalRight, textureBottomRight),
};
``````

Draw call

``````        for (int i = 0; i < blocks.Count; i++)
{
graphics.GraphicsDevice.DrawUserPrimitives(PrimitiveType.TriangleList, blocks[i], 0, 12);
if(i==2)
break;
}
``````

So far so good but then some of the normal are wrong.

Then I rotate the view matrix and these normals seem fine.

I think I found the problematic face… the bottom one. It’s as if the faces are showing through others.