# Render to texture broken in linux chrome?

**URL:** <https://discourse.threejs.org/t/render-to-texture-broken-in-linux-chrome/30413>\
**Category:** Questions\
**Tags:** render-target, bug\
**Created:** [September 30, 2021, 9:12pm UTC](https://discourse.threejs.org/t/render-to-texture-broken-in-linux-chrome/30413 "2021-09-30T21:12:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbrandon](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/gbrandon/32/21312_2.png) [@gbrandon](https://discourse.threejs.org/u/gbrandon)\
**Post date:** [September 30, 2021, 9:12pm UTC](https://discourse.threejs.org/t/render-to-texture-broken-in-linux-chrome/30413/1 "2021-09-30T21:12:50Z")

</div>

Rendering to texture seems to be severely glitched in linux chrome:  
[codesandbox](https://oln6y.csb.app/)

[https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/4/5/45dbbd5cea71b372d72f579948ceb37964c0e05a.webm](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/4/5/45dbbd5cea71b372d72f579948ceb37964c0e05a.webm)

I am close to filing a chrome bug report, but I really don’t know much about what’s going on since I’m not at the level to replicate it without using threejs. Is there a possibility that it could be a threejs issue? Also, if I’m to file a chrome bug, what might be the name of the feature that’s broken? FBO?

---

<div class="post-metadata">

**Author:** ![yombo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/yombo/32/3325_2.png) [@yombo](https://discourse.threejs.org/u/yombo)\
**Post date:** [September 30, 2021, 10:21pm UTC](https://discourse.threejs.org/t/render-to-texture-broken-in-linux-chrome/30413/2 "2021-09-30T22:21:15Z")

</div>

The GPGPU examples, which use render to texture, are working for me:  
[https://threejs.org/examples/?q=gpgpu](https://threejs.org/examples/?q=gpgpu)

---

<div class="post-metadata">

**Author:** ![gbrandon](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/gbrandon/32/21312_2.png) [@gbrandon](https://discourse.threejs.org/u/gbrandon)\
**Post date:** [September 30, 2021, 11:12pm UTC](https://discourse.threejs.org/t/render-to-texture-broken-in-linux-chrome/30413/3 "2021-09-30T23:12:14Z")

</div>

The example provided renders a scene to a texture from various angles–if the camera were never to have spun around, you’d never see the horrors.

---

<div class="post-metadata">

**Author:** ![gbrandon](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/gbrandon/32/21312_2.png) [@gbrandon](https://discourse.threejs.org/u/gbrandon)\
**Post date:** [October 1, 2021, 12:18pm UTC](https://discourse.threejs.org/t/render-to-texture-broken-in-linux-chrome/30413/4 "2021-10-01T12:18:13Z")

</div>

Card and driver of myself and friends who’ve verified the issue:

Me: 750 ti, driver 470.57.02  
B: gtx 1060 nvidia, nvidia-propietary-460  
S: rtx 2070, “latest available”

---

<div class="post-metadata">

**Author:** ![gui](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/gui/32/27258_2.png) [@gui](https://discourse.threejs.org/u/gui)\
**Post date:** [October 1, 2021, 12:51pm UTC](https://discourse.threejs.org/t/render-to-texture-broken-in-linux-chrome/30413/5 "2021-10-01T12:51:05Z")

</div>

also on linux, I see that this behaves fine on firefox, and see the same issue on chrome.  
That said, if I set the camera near to 1 instead of 0.01, the issue disappears. So I’d be tempted to say this is just a typical precision issue when camera near is too small and far too large (although I admit I would have expected both firefox and chrome to behave similarly).

---

<div class="post-metadata">

**Author:** ![gbrandon](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/gbrandon/32/21312_2.png) [@gbrandon](https://discourse.threejs.org/u/gbrandon)\
**Post date:** [October 1, 2021, 1:28pm UTC](https://discourse.threejs.org/t/render-to-texture-broken-in-linux-chrome/30413/6 "2021-10-01T13:28:00Z")

</div>

Thank you! I would say it’s still noticeable at near=1 but fine at near=10. But that’s quality info and a workaround!

---

<div class="post-metadata">

**Author:** ![gbrandon](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/gbrandon/32/21312_2.png) [@gbrandon](https://discourse.threejs.org/u/gbrandon)\
**Post date:** [October 2, 2021, 3:04am UTC](https://discourse.threejs.org/t/render-to-texture-broken-in-linux-chrome/30413/7 "2021-10-02T03:04:11Z")

</div>

Considering the workaround near=10 would make things disappear when still pretty far from the camera, I reckoned one could simply scale everything in the scene up to compensate. However, then the glitches become noticeable again:

[sandbox fork (10x scale)](https://31h7u.csb.app/)

[https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/4/4/44a8db4a988d5b49a7812dbdc7513b97fe2daa47.webm](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/4/4/44a8db4a988d5b49a7812dbdc7513b97fe2daa47.webm)
