P4: Lab: a background mission's $Environment Map is never used
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 66/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- computer-graphics, game-dev
Hướng nghiên cứu
Bắt đầu trong LabRenderer::useBackground, nơi $Environment Map của nhiệm vụ được đọc vào envmap_name nhưng thay vào đó The_mission.envmap_name lại được tải. So sánh với environment_map_gen trong starfield.cpp, rồi kiểm tra bài test ENVMAP > 1 theo sau. Hoàn tất khi một con tàu trong lab mang màu environment map của nhiệm vụ nền, khớp với nhiệm vụ. Để kiểm thử cần một nhiệm vụ cubemap và một bản build debug OpenGL.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 488
- Fork
- 184
- Merge trung bình
- 2 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 35
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của scp-fs2open/fs2open.github.com
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
scp-fs2open/fs2open.github.com#7953 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
scp-fs2open/fs2open.github.com#7946 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
scp-fs2open/fs2open.github.com#7924 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
scp-fs2open/fs2open.github.com#7918 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
scp-fs2open/fs2open.github.com#7917 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của scp-fs2open/fs2open.github.com
Issue tương tự
-
bug priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
chipsalliance/verible#2644 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
grafana/pyroscope-dotnet#470 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation P5 XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
open-astro/AlpacaBridge#1848 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DiskANN AnnIterator returns unconverted IP distances after the graph walk runs out of candidatesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
zilliztech/knowhere#1933 ·
Maintainer thường phản hồi trong vòng 1 ngày