I’m trying to create a 3d maze out of a 2d grid of ones and zeros where 0 is a wall and 1 is a passage.

as you can see in the picture below, the left wall looks correct, but the right wall looks like the normal maps are inverted. also the back and front facing walls look flat.

each wall is generated using

```
Matrix4x4.TRS(new Vector3((j + .5f) * width, halfH, i * width),Quaternion.LookRotation(Vector3.left),new Vector3(width, height, 1)
```

with the corresponsing rotation, and then the matrix is used to generate this way:

```
Vector3 vert1 = new Vector3(-.5f, -.5f, 0);
Vector3 vert2 = new Vector3(-.5f, .5f, 0);
Vector3 vert3 = new Vector3(.5f, .5f, 0);
Vector3 vert4 = new Vector3(.5f, -.5f, 0);
var verts = new Vector3[4];
verts[0] = matrix.MultiplyPoint3x4(vert1);
verts[1] = matrix.MultiplyPoint3x4(vert2);
verts[2] = matrix.MultiplyPoint3x4(vert3);
verts[3] = matrix.MultiplyPoint3x4(vert4);
newVertices.Add(verts[0]);
newVertices.Add(verts[1]);
newVertices.Add(verts[2]);
newVertices.Add(verts[3]);
newUVs.Add(new Vector2(1, 0));
newUVs.Add(new Vector2(1, 1));
newUVs.Add(new Vector2(0, 1));
newUVs.Add(new Vector2(0, 0));
newTriangles.Add(index + 2);
newTriangles.Add(index + 1);
newTriangles.Add(index);
newTriangles.Add(index + 3);
newTriangles.Add(index + 2);
newTriangles.Add(index);
```