Skip to content

加载 hdr 文件 场景生效 无环境光 #109

Answered by zhuxudong
MrTangmx asked this question in Engine
Discussion options

You must be logged in to vote

那你 loader 不应该使用 HDRLoader 呢,应该使用 AssetType.Env,参考官网案例

 engine.resourceManager
    .load<AmbientLight>({
      type: AssetType.Env,
      url: "https://gw.alipayobjects.com/os/bmw-prod/6470ea5e-094b-4a77-a05f-4945bf81e318.bin",
    })
    .then((ambientLight) => {
      scene.ambientLight = ambientLight;
    });

然后这个烘焙产物是需要经过编辑器或者 glTF-viewer 离线烘焙得到的,参考文档

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@zhuxudong
Comment options

@MrTangmx
Comment options

@MrTangmx
Comment options

@zhuxudong
Comment options

Answer selected by zhuxudong
@zhuxudong
Comment options

@MrTangmx
Comment options

@MrTangmx
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Engine
Labels
None yet
3 participants