fix: terrain descriptor pool leak, minimap quest markers, and item comparison UI

- terrain_renderer: add FREE_DESCRIPTOR_SET_BIT flag and vkFreeDescriptorSets
  in destroyChunkGPU so material descriptor sets are returned to the pool;
  prevents GPU device lost from pool exhaustion near populated areas
- game_screen: fix projectToMinimap to use the exact inverse of the minimap
  shader transform so quest objective markers appear at the correct position
  and orientation regardless of camera bearing
- inventory_screen: fix item comparison tooltip to not compare equipped items
  against themselves (character screen); add item level diff line; show (=)
  indicator when stats are equal rather than bare value which looked identical
  to the item's own tooltip
This commit is contained in:
Kelsi 2026-03-11 01:29:56 -07:00
parent 568c566e1a
commit f462db6bfa
3 changed files with 32 additions and 6 deletions

View file

@ -9406,10 +9406,13 @@ void GameScreen::renderMinimapMarkers(game::GameHandler& gameHandler) {
float dx = worldRenderPos.x - playerRender.x;
float dy = worldRenderPos.y - playerRender.y;
// Match minimap shader transform exactly.
// Render axes: +X=west, +Y=north. Minimap screen axes: +X=right(east), +Y=down(south).
float rx = -dx * cosB + dy * sinB;
float ry = -dx * sinB - dy * cosB;
// Exact inverse of minimap display shader:
// shader: mapUV = playerUV + vec2(-rotated.x, rotated.y) * zoom * 2
// where rotated = R(bearing) * center, center in [-0.5, 0.5]
// Inverse: center = R^-1(bearing) * (-deltaUV.x, deltaUV.y) / (zoom*2)
// With deltaUV.x ∝ +dx (render +X=west=larger U) and deltaUV.y ∝ -dy (V increases south):
float rx = -(dx * cosB + dy * sinB);
float ry = dx * sinB - dy * cosB;
// Scale to minimap pixels
float px = rx / viewRadius * mapRadius;