Import CustomShaderMaterial

Are you referring to this npm package? I’m not sure you’ll be able to use this with import maps outside of npm without a lot of hassle as it has 4 other npm dependencies and 13 other npm dev dependencies… What you can try is importing the CDN version, otherwise three has an inbuilt ShaderMaterial that you can compile with shader chunks from other materials or you can use onBeforeCompile on existing materials to include your desired fragment and vertex shader chunks…

1 Like