Hey guys. I was just wondering if there’s a way to make Threejs mesh physical material, and plug in a custom glsl shader into just the map/color. So it still has params like roughness, alpha,… but I can control the map value with my shader.
You have to perform a render with your custom shader, save the result in a render target and then use its
texture property as the input for
MeshPhysicalMaterial.map. To produce the render target, it’s best to use a fullscreen quad with an orthographic camera like in three.js webgl - shader [Monjori]