#React Three Fibre and .glsl
4 messages · Page 1 of 1 (latest)
Do you mean that the changes in the .glsl file don't re-trigger the hot reload? In that case the issue is in your vite.config.js.
See vite-plugin-glsl, https://www.npmjs.com/package/vite-plugin-glsl
@supple pendant
Yes, doesn't trigger the hot reload.
I install the vite-plugin-glsl and follow the doc correctly but the issue still persist
Can you see in your dev console the hot reloading happening, when you make an edit and save? If so, then the issue may be that the shader is not getting recompiled (by design to save performance). You will need to find a way to manually retrigger the compile process.
I'm usually using the onBeforeCompile callback to make adjustements to existing shadermaterials and there I've found a little trick to add console.log() if development, and the shader will be recompiled every time.