# R3F with GPUComputationRender doesn't work

**URL:** <https://discourse.threejs.org/t/r3f-with-gpucomputationrender-doesnt-work/60265>\
**Category:** Questions\
**Tags:** textures, shaders\
**Created:** [January 13, 2024, 4:52am UTC](https://discourse.threejs.org/t/r3f-with-gpucomputationrender-doesnt-work/60265 "2024-01-13T04:52:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexey9911](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/alexey9911/32/43770_2.png) [@Alexey9911](https://discourse.threejs.org/u/Alexey9911)\
**Post date:** [January 13, 2024, 4:52am UTC](https://discourse.threejs.org/t/r3f-with-gpucomputationrender-doesnt-work/60265/1 "2024-01-13T04:52:44Z")

</div>

is it possible use r3f with GPUComputationRenderer? i dont get the same result if i use r3f or just js version, i have the same code in both but i dont know what is react doing, the result is not the same as in js version

js version: [https://codesandbox.io/p/github/Alexey9911/vite-three-js/main?file=%2Fsrc%2Fjs%2Fthree.js&embed=1](https://codesandbox.io/p/github/Alexey9911/vite-three-js/main?file=%2Fsrc%2Fjs%2Fthree.js&embed=1)

r3f version: [https://codesandbox.io/p/github/Alexey9911/testing-r3f-glsl/main?embed=1&file=%2Fsrc%2FGPGPU.jsx](https://codesandbox.io/p/github/Alexey9911/testing-r3f-glsl/main?embed=1&file=%2Fsrc%2FGPGPU.jsx)

EDIT: problem solved, just was a little syntax mistake 😅

---

<div class="post-metadata">

**Author:** ![drcmda](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@drcmda](https://discourse.threejs.org/u/drcmda)\
**Post date:** [January 13, 2024, 8:26am UTC](https://discourse.threejs.org/t/r3f-with-gpucomputationrender-doesnt-work/60265/2 "2024-01-13T08:26:31Z")

</div>

generally react cannot change the outcome and it doesn’t change anything in threejs. anything you can do in threejs you can do in fiber. but the code is too complex for me to understand, there has to be a difference, or something you forgot.

i have a gpgpu example around, maybe it helps

> **[GPGPU Curl-noise + DOF - CodeSandbox](https://codesandbox.io/s/zgsyn)**
>
> Curl noise and depth of field.

---

<div class="post-metadata">

**Author:** ![Alexey9911](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/alexey9911/32/43770_2.png) [@Alexey9911](https://discourse.threejs.org/u/Alexey9911)\
**Post date:** [January 13, 2024, 3:11pm UTC](https://discourse.threejs.org/t/r3f-with-gpucomputationrender-doesnt-work/60265/3 "2024-01-13T15:11:32Z")

</div>

maybe there is the solution to my problem but i can’t find out :(, thx for the link btw

---

<div class="post-metadata">

**Author:** ![drcmda](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@drcmda](https://discourse.threejs.org/u/drcmda)\
**Post date:** [January 13, 2024, 9:09pm UTC](https://discourse.threejs.org/t/r3f-with-gpucomputationrender-doesnt-work/60265/4 "2024-01-13T21:09:27Z")

</div>

well there is for sure. i struggled a lot trying to untangle vanilla projects, it’s a soup of code and it’s so easy to miss that one critical thing that throws everything up in the end. you’ll find it.
