我目前在three.js中嘗試了一下,我想使用發射貼圖。我試過只是將一個紋理加載到phong材質的發射屬性中,但不幸的是,它不能這樣工作。這裏是我的代碼:three.js發射材質貼圖
var params = {
emissive: THREE.ImageUtils.loadTexture(emissive),
shininess: shininess,
map: THREE.ImageUtils.loadTexture(map),
normalMap: THREE.ImageUtils.loadTexture(normalMap),
normalScale: new THREE.Vector2(0,-1),
envMap: this.reflectionCube,
combine: THREE.MixOperation,
reflectivity: 0.05
};
var material = new THREE.MeshPhongMaterial(params);
任何人都可以指出我在正確的方向得到發射圖的工作?
'MeshPhongMaterial'不支持發射貼圖。 – WestLangley
是的,我想。但我需要發射地圖工作。有什麼支持發射地圖嗎? –
不可以。您可以通過搜索代碼庫來查看。但是,您可以創建自己的自定義「ShaderMaterial」。 – WestLangley