Question: I am in the process of making a simple racing game using Apple's SceneKit library. I have modeled a left turn section of the race track. I am able to successfully load the model into an SCNGeometry that I can then render. However, I would like to be able to use this model for both a left and right turn segment. To do this, I need to mirror the SCNGeometry over the y-z plane, though I can't for the life of me figure out how.

In SpriteKit, one can mirror a sprite by setting the corresponding SKNode's scale to -1. However, if I set the SCNGeometry's SCNNode's x scale to -1, the SCNGeometry will not render at all. While I can mirror the model in my modeling software, I would prefer not to have two basically identical models. Any suggestions would be appreciated.

Answer: 
Alright, turns out setting the SCNNode's x scale to -1 does in fact mirror the SCNGeometry.The issue is, when an SCNGeometry is mirrored that way, all of the faces are pointed inwards instead of outwards so none are rendered. If the object's material is changed so that the front faces are culled instead of the back faces, the SCNGeometry will be mirrored as expected.
If you don't want to change the geometry, but just change the texture, you can do:

```
let flip = SCNMatrix4Translate(
        SCNMatrix4Scale(material.diffuse.contentsTransform, 1.0, -1.0, 1.0),
        0, 1, 0
    )
material.diffuse.contentsTransform = flip

```

or directly,

```
material.diffuse.contentsTransform = SCNMatrix4FromGLKMatrix4(GLKMatrix4(m: (
  -1.0, 0.0, 0.0, 0.0,
  0.0, 1.0, 0.0, 0.0,
  0.0, 0.0, 1.0, 0.0,
  -1.0, 0.0, 0.0, 1.0
)))

```

This will replace the texture `x` coordinate by `1-x` which should flip it. I've played around with shaders, and I believe the relevant shader code showing how SceneKit uses the content transform is

```
v_texcoord0 = (u_diffuseTextureMatrix * vec4(_geometry.texcoords[0], 0., 1.)).xy;

```

([see here](https://gist.github.com/gsabran/d705d1a305908156537d2a9418c67a22#file-scnshadable-vertex-shader-vert-L218))