[0]外部加载的图片,texture.bitmap._texture.gammaCorrection值和引擎内嵌图片加载不一致

 
//外部加载的图片,texture.bitmap._texture.gammaCorrection默认是2.2,手动修改成1,并没有效果,否则我用做贴图纹理,
模型会变得很白
 
let texture = await Laya.loader.load(url);
texture.bitmap._texture.gammaCorrection = 1;//这样子修改并没有无效
 
 
let sharedMaterial = this.owner.getComponent(Laya.MeshRenderer).sharedMaterial as Laya.UnlitMaterial;
sharedMaterial.albedoTexture = texture;
 
 
90b854350d268e3cd11277ef082a4ec4.png
已邀请:

Laya_Fred

赞同来自:

您好,代码加载纹理设置纹理内容可以看下这个文档的内容,使用Option参数内容来设置纹理的格式等;Option参数

yi979070830

赞同来自:

采用Laya.Texture2D.load方式加载外部连接的纹理,texture._texture.gammaCorrection是等于1了,但是模型也一样会发白,为什么?
Laya.Texture2D.load(url, Laya.Handler.create(null, (texture:Laya.Texture2D)=> {
let sharedMaterial = this.owner.getComponent(Laya.MeshRenderer).sharedMaterial as Laya.UnlitMaterial;
     sharedMaterial.albedoTexture = texture; }

要回复问题请先

商务合作
商务合作