R3F with GPUComputationRender doesn't work

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

r3f version: 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 :sweat_smile:

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

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

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.

1 Like