Fix Skybox Init Directory

This commit is contained in:
2026-08-22 19:23:47 +09:00
parent 9f15aaa9e6
commit b6d8ca428f
7 changed files with 4 additions and 2 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 602 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 KiB

+4 -2
View File
@@ -78,8 +78,10 @@ Renderer::Renderer(Graphic &graphic) : m_graphic(graphic) {
}
// [新增] 默认尝试读取 C:/temp。文件不存在时不阻止引擎启动,PBR 会使用旧环境项回退。
if (!LoadEnvironmentCubeDirectory(L"C:/temp")) {
OutputDebugStringW(L"未加载默认 TextureCube。请在 C:/temp 放置 "
std::filesystem::path cubeDir = std::filesystem::path{StatesRender::S_GetExeDir()} / std::filesystem::path{L"assets/skybox"};
// if (!LoadEnvironmentCubeDirectory(L"C:/temp")) {
if (!LoadEnvironmentCubeDirectory(cubeDir)) {
OutputDebugStringW(L"未加载默认 TextureCube。请在根目录下的assets/skybox/目录放置 "
L"posx/negx/posy/negy/posz/negz 六张同尺寸正方形图片。\n");
}
}