Threejs如何修改GLTF着色器

时间:2019-01-17 20:35:53

标签: three.js shader gltf

我对threejs世界还比较陌生,我正努力解决2个问题。

1. I am trying to add another texture (with transparency) on top of my gltf model.
2. I need the model color to not apply to that extra texture.

我正在使用GLTFLoader将模型添加到场景中。我认为修改片段着色器将是最干净的方法(也许)。但是,我无法为GLTF模型修改材质的扩散通道。我尝试在onBeforeCompile中修改着色器,但是无法将sampler2D传递给具有正确UV的制服。我如何在GLTF模型着色器中修改漫反射通道,然后才能获得所有照明和其他效果? 我也想使用多余的图像作为遮罩来忽略模型颜色。任何帮助/建议将不胜感激。谢谢

0 个答案:

没有答案
相关问题