# Is there a conflict between stencil test and RTT?

**URL:** <https://discourse.threejs.org/t/is-there-a-conflict-between-stencil-test-and-rtt/61687>\
**Category:** Questions\
**Tags:** rtt, stencil\
**Created:** [February 20, 2024, 12:11pm UTC](https://discourse.threejs.org/t/is-there-a-conflict-between-stencil-test-and-rtt/61687 "2024-02-20T12:11:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dy111111](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/dy111111/32/40317_2.png) [@Dy111111](https://discourse.threejs.org/u/Dy111111)\
**Post date:** [February 20, 2024, 12:11pm UTC](https://discourse.threejs.org/t/is-there-a-conflict-between-stencil-test-and-rtt/61687/1 "2024-02-20T12:11:49Z")

</div>

I need to render the scene with the stencil applied to texture, but the result of RTT is incorrect. Directly rendering it to screen is correct, I don’t know why. The question is when RTT, the part that didn’t pass stencil test will be rendered to texture too.  
The case is from official demo clipping stencil

 ![1](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/6/b/6b4aaaea0e187751686127b7982e4d85e221bd36.png)  
this is render to screen  
 ![2](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/3/2/32398830e0922c83cbd478865035e974c04e73d7.png)  
this is render to texture ,then using shader reading texture, render to screen. we can it’s a result without stencil test.
