# backface culling and shadows in cycles

Using the backfacing property on the geometry node it is possible to selectively make faces transparent in cycles and thus create an effect similar to backface culling. However, due to the way this boolean is set it does not eliminate shadows of the now invisible faces. I need cycles to render a material with backface culling as if the faces culled from the point of view of the camera no longer exist at all.

the top answer here provides one such setup, but it relies heavily on having a single known camera. I really want to be able to link this material into different blend files without manually adjusting the shader to take into account any new cameras. Is this possible to do, and if so, how?

## 1 Answer

The solution was to take the previously mentioned top answer from here, and to get the current active camera from the depsgraph. I.e. to get the x coordinate of any active camera, use the following driver expression:

depsgraph.scene.camera.location.x if depsgraph.scene.camera is not None else 0