GPGPU Curl-noise + DOF example browser freezing on load #2408
-
Hey everyone, have been working on porting the GPGPU Curl-noise + DOF to nextjs (repo which I managed to do with the great help of @CodyJasonBennett & @drcmda (discussion). Now I have been wondering - when loading the codesandbox the browser freezes (I think during the init of the shader). Even when dynamically importing the component and using So now my question - does anyone here know how this temporary freezing of the browser could be avoided? Many thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
best you figure out what exactly is freezing, for instance in devtools. theres a button that refreshes a performance snap. im not too familiar with datatextures, but if something needs to fill them and gpu upload takes so long then it's probably nothing you can easily fix. everything that goes over 20-30 milliseconds on the cpu mainthread can potentially freeze the tab. |
Beta Was this translation helpful? Give feedback.
-
Okey, I guess the problem is that threejs doesn't support parallel shader compile yet. There is some progress on this issue though, as can be seen here (mrdoob/three.js#16321). An example of the performance benefits: https://registry.khronos.org/webgl/sdk/tests/performance/parallel_shader_compile/ |
Beta Was this translation helpful? Give feedback.
Okey, I guess the problem is that threejs doesn't support parallel shader compile yet.
There is some progress on this issue though, as can be seen here (mrdoob/three.js#16321).
An example of the performance benefits: https://registry.khronos.org/webgl/sdk/tests/performance/parallel_shader_compile/