# How to render twice per frame with two different cull face modes?

**URL:** <https://discourse.threejs.org/t/how-to-render-twice-per-frame-with-two-different-cull-face-modes/37101>\
**Category:** Questions\
**Tags:** webgl-renderer, materials\
**Created:** [April 15, 2022, 2:21pm UTC](https://discourse.threejs.org/t/how-to-render-twice-per-frame-with-two-different-cull-face-modes/37101 "2022-04-15T14:21:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jszsj](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jszsj/32/25637_2.png) [@jszsj](https://discourse.threejs.org/u/jszsj)\
**Post date:** [April 15, 2022, 2:21pm UTC](https://discourse.threejs.org/t/how-to-render-twice-per-frame-with-two-different-cull-face-modes/37101/1 "2022-04-15T14:21:28Z")

</div>

Hello! I’m new to three.js 🙂  
I want to do a render with ‘CullFaceFront’ mode, then do another render with ‘CullFaceBack’ mode on top of the first render, do the two renders per frame, any idea?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [April 15, 2022, 3:40pm UTC](https://discourse.threejs.org/t/how-to-render-twice-per-frame-with-two-different-cull-face-modes/37101/2 "2022-04-15T15:40:40Z")

</div>

You can do this by modifying the `side` property of all materials in your scene. Meaning in the first pass you use `THREE.FrontSide`, in the second pass you use `THREE.BackSide`. When changing the `side` property, you have to set the `needsUpdate` flag of the materials to `true`.

Since you call `WebGLRenderer.render()` more than once to produce a frame, you have to set the renderer’s `autoUpdate` property to `false` and perform the clear manually via `renderer.clear()` at the beginning of your render loop.

---

<div class="post-metadata">

**Author:** ![jszsj](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jszsj/32/25637_2.png) [@jszsj](https://discourse.threejs.org/u/jszsj)\
**Post date:** [April 16, 2022, 2:15am UTC](https://discourse.threejs.org/t/how-to-render-twice-per-frame-with-two-different-cull-face-modes/37101/3 "2022-04-16T02:15:55Z")

</div>

Aha,it works very well,thanks a lot!
