I'm not familiar with three.js and shader. I export a gltf dragon model with texture from C4d and load it into meshstandard material in three.js. I want to change them into cartoon material. With the model stroke, I can traverse the gltf material like this
mesh.traverse((node: any) => {
let newMat = new THREE.ShaderMaterial({
uniforms: {
},
vertexShader: vertexShader,
fragmentShader: fragmentShader,
});
node.material = newMat
});
I found a cartoon rendering tutorial https://blog.csdn.net/weixin_37683659/article/details/79953500
But I still don't know how to combine this