P4: Lab: a background mission's $Environment Map is never used
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 半天
- 新手友好度
- 66/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- cpp
调研方向
从 LabRenderer::useBackground 开始,这里会读取任务的 $Environment Map 到 envmap_name,但实际加载的是 The_mission.envmap_name。与 starfield.cpp 中的 environment_map_gen 比较,然后检查紧随其后的 ENVMAP > 1 测试。当实验室中的飞船呈现出背景任务的环境贴图颜色并与任务一致时,即完成。测试需要 cubemap 任务和 OpenGL 调试构建。
由索引模型根据 Issue 内容生成。
描述
This is minor: it only affects the F3 lab's preview, not missions.
Problem
When you pick a mission as the lab's background, the lab loads that mission's stars, suns and bitmaps but ignores its $Environment Map. Ships in the lab don't reflect the environment map the mission names, so the lab preview doesn't match what the ship looks like in that mission.
Steps to reproduce
- Current master (8afa31842), debug build, Linux, OpenGL, MediaVPs 5.0.2.
- Use a mission whose
$Environment Mapis a cubemap with obvious colors. I used a test mission with a 64x64 cubemap that has one bright color per face. - Open the lab (F3), show a GTC Fenris, then pick that mission under Mission Background.
- Compare with the same Fenris in that mission.
Expected vs. actual behavior
Expected: the Fenris in the lab picks up the environment map's colors, like it does in the mission.
Actual: the background loads (the stars appear), but the hull stays plain grey. In the mission, the same map tints the whole hull.
From reading the code: LabRenderer::useBackground reads the mission's $Environment Map into a local envmap_name, but then loads The_mission.envmap_name instead, which in the lab is empty or left over from the last mission played. So the background's map is never loaded. I haven't tested the case where the leftover name points at a flat (non-cubemap) texture; by reading, it could hit the same OpenGL crash as #2245.
Proposed fixes
- Load
envmap_name(the name just read) instead ofThe_mission.envmap_name, and change theENVMAP > 1check right after it to>= 0. - Same as 1, plus the cubemap check from #7930, so a flat texture falls back to the generated map in the lab too.
- Share one helper between the lab and
environment_map_genin starfield.cpp, so both load and check the mission's environment map the same way.
- 主要语言
- C++
- 星标
- 488
- 派生
- 184
- 平均合并
- 2 天 2 小时
- 30 天内合并 PR
- 35
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
scp-fs2open/fs2open.github.com 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
scp-fs2open/fs2open.github.com#7953 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
scp-fs2open/fs2open.github.com#7946 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
scp-fs2open/fs2open.github.com#7924 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
scp-fs2open/fs2open.github.com#7918 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
scp-fs2open/fs2open.github.com#7917 ·
维护者通常 1 天内回复
查看 scp-fs2open/fs2open.github.com 的全部 Issue
相似的 Issue
-
bug priority: low
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
chipsalliance/verible#2644 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
grafana/pyroscope-dotnet#470 ·
维护者通常 1 天内回复
-
documentation P5 XS
难度 2/5 1-3 小时 新手友好度 72/100
open-astro/AlpacaBridge#1848 ·
维护者通常 1 天内回复
-
DiskANN AnnIterator returns unconverted IP distances after the graph walk runs out of candidates未关闭
难度 2/5 1-3 小时 新手友好度 75/100
zilliztech/knowhere#1933 ·
维护者通常 1 天内回复