Skip to content

Fix black mission briefing map textures - #3

Draft
isaac-ranger wants to merge 1 commit into
Alexbeav:masterfrom
isaac-ranger:codex/briefing-map-black-textures-upstream
Draft

Fix black mission briefing map textures#3
isaac-ranger wants to merge 1 commit into
Alexbeav:masterfrom
isaac-ranger:codex/briefing-map-black-textures-upstream

Conversation

@isaac-ranger

Copy link
Copy Markdown

Summary

  • enforce the documented opaque-alpha contract for gos_Texture_Solid textures populated through Lock() / Unlock()
  • preserve source alpha for keyed and alpha texture formats
  • document the root cause and completed mc2_02 runtime verification

Root cause

The briefing thumbnail is passed to textureFromMemory() as gos_Texture_Solid. That path creates an empty texture, locks it, copies the source BGRA pixels, and unlocks it. Unlike the file-backed and encoded-memory paths, it bypasses convertIfNecessary() / makeKindaSolid(), so legacy zero-alpha values from the otherwise healthy source TGA reached the OpenGL texture. Normal alpha blending then exposed the black destination behind the map quad.

gosTexture::Unlock() now forces alpha to 255 only for gos_Texture_Solid while performing its existing BGRA-to-RGBA conversion. Keyed and alpha formats keep their source alpha.

Validation

  • the affected gameos target compiles and links successfully in the native Linux build
  • the full native executable linked successfully using build-only compatibility settings outside this branch
  • modeled conversion makes all 16,384 pixels in the affected 128x128 thumbnail opaque without changing RGB data
  • keyed and alpha formats do not take the new branch
  • live mc2_02 mission-briefing verification showed blue water, colored terrain/buildings, the normal red objective marker, and a textured objective model with no black map regions or black texture quads

Scope

This PR changes only GameOS/gameos/gameos_graphics.cpp and the existing briefing-map investigation devlog. It adds no assets, binaries, launchers, campaign overrides, or other test-harness files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant