1
This commit is contained in:
@ -786,18 +786,33 @@ export class GameManager extends Monobehiver {
|
||||
}
|
||||
|
||||
// 应用反照率纹理(颜色贴图)
|
||||
if (options.albedoTexture) {
|
||||
material.albedoTexture = new Texture(options.albedoTexture);
|
||||
if (options.albedoTexture !== undefined) {
|
||||
if (options.albedoTexture) {
|
||||
material.albedoTexture = new Texture(options.albedoTexture);
|
||||
} else {
|
||||
// 传入空字符串或 null 时清空贴图
|
||||
material.albedoTexture = null;
|
||||
}
|
||||
}
|
||||
|
||||
// 应用法线贴图
|
||||
if (options.normalMap) {
|
||||
material.bumpTexture = new Texture(options.normalMap);
|
||||
if (options.normalMap !== undefined) {
|
||||
if (options.normalMap) {
|
||||
material.bumpTexture = new Texture(options.normalMap);
|
||||
} else {
|
||||
// 传入空字符串或 null 时清空贴图
|
||||
material.bumpTexture = null;
|
||||
}
|
||||
}
|
||||
|
||||
// 应用金属度贴图
|
||||
if (options.metallicTexture) {
|
||||
material.metallicTexture = new Texture(options.metallicTexture);
|
||||
if (options.metallicTexture !== undefined) {
|
||||
if (options.metallicTexture) {
|
||||
material.metallicTexture = new Texture(options.metallicTexture);
|
||||
} else {
|
||||
// 传入空字符串或 null 时清空贴图
|
||||
material.metallicTexture = null;
|
||||
}
|
||||
}
|
||||
|
||||
// 应用粗糙度值
|
||||
|
||||
Reference in New Issue
Block a user