MinecraftConsoles/Minecraft.Client/Common
MrTheShy e2adaa082c
Fix split-screen UI wrong positioning on window resize (#989)
* Fix split-screen UI wrong positioning on window resize

In vertical split at window heights below 1080, ComputeTileScale's min-scale clamp (>= 1.0) prevented the SWF from scaling down to fit, cropping the bottom and causing repositionHud to shift HUD elements downward. Chat and Tooltips additionally applied an offset from ComputeSplitContentOffset that only produced correct values at the 1920x1080 design resolution.

Override the scale for vertical split so the SWF fits the full window height when it is shorter than the movie. Remove the broken content offset from Chat and Tooltips -- the tile crop already positions the content correctly.

* Fix gamma post-process in split-screen

The gamma shader sampled the full backbuffer texture (UV 0..1) into each player's viewport, stretching the entire screen into every split region. Extended the shader constant buffer with per-viewport UV offset and scale so each pass samples only its own portion of the backbuffer.

ComputeViewportForPlayer was hardcoded to top/bottom for 2 players, ignoring the vertical split setting. Rewrote it to read each player's m_iScreenSection directly, which already accounts for the split orientation preference.

Secondary players have no Graphics menu and cannot change gamma. CachePlayerGammas now reads the primary player's setting and applies it uniformly to all viewports.
2026-03-08 22:16:58 -05:00
..
Audio Modernize project codebase (#906) 2026-03-08 18:08:36 -05:00
Colours Modernize project codebase (#906) 2026-03-08 18:08:36 -05:00
DLC Modernize project codebase (#906) 2026-03-08 18:08:36 -05:00
DummyTexturePack/res Initial commit 2026-03-01 12:16:08 +08:00
GameRules Modernize project codebase (#906) 2026-03-08 18:08:36 -05:00
Leaderboards Modernize project codebase (#906) 2026-03-08 18:08:36 -05:00
Media Add Render Distance option. (#675) 2026-03-06 19:14:06 -06:00
Network Modernize project codebase (#906) 2026-03-08 18:08:36 -05:00
res feat: TU19 (Dec 2014) Features & Content (#155) 2026-03-03 03:04:10 +08:00
Telemetry Modernize project codebase (#906) 2026-03-08 18:08:36 -05:00
Trial Initial commit 2026-03-01 12:16:08 +08:00
Tutorial Modernize project codebase (#906) 2026-03-08 18:08:36 -05:00
UI Fix split-screen UI wrong positioning on window resize (#989) 2026-03-08 22:16:58 -05:00
XUI Modernize project codebase (#906) 2026-03-08 18:08:36 -05:00
zlib Modernize project codebase (#906) 2026-03-08 18:08:36 -05:00
App_Defines.h feat: TU19 (Dec 2014) Features & Content (#155) 2026-03-03 03:04:10 +08:00
App_enums.h Add Render Distance option. (#675) 2026-03-06 19:14:06 -06:00
App_structs.h Save FOV value to settings (#670) 2026-03-06 16:38:16 -06:00
BuildVer.h Change F3 rendering and add git version information (#836) 2026-03-07 13:55:44 -06:00
C4JMemoryPool.h Initial commit 2026-03-01 12:16:08 +08:00
C4JMemoryPoolAllocator.h Initial commit 2026-03-01 12:16:08 +08:00
CommonMedia.sln Initial commit 2026-03-01 12:16:08 +08:00
CommonMedia.vcxproj Initial commit 2026-03-01 12:16:08 +08:00
CommonMedia.vcxproj.filters Initial commit 2026-03-01 12:16:08 +08:00
Console_Awards_enum.h Initial commit 2026-03-01 12:16:08 +08:00
Console_Debug_enum.h feat: TU19 (Dec 2014) Features & Content (#155) 2026-03-03 03:04:10 +08:00
Console_Utils.cpp Initial commit 2026-03-01 12:16:08 +08:00
ConsoleGameMode.cpp Optimize Path for Tutorial.h in ConsoleGameMode.cpp 2026-03-01 15:05:24 -07:00
ConsoleGameMode.h Optimize TutorialMode.h Filepath in ConsoleGameMode.h 2026-03-01 15:06:42 -07:00
Consoles_App.cpp Modernize project codebase (#906) 2026-03-08 18:08:36 -05:00
Consoles_App.h Modernize project codebase (#906) 2026-03-08 18:08:36 -05:00
Minecraft_Macros.h Initial commit 2026-03-01 12:16:08 +08:00
PostProcesser.h Fix split-screen UI wrong positioning on window resize (#989) 2026-03-08 22:16:58 -05:00
Potion_Macros.h feat: TU19 (Dec 2014) Features & Content (#155) 2026-03-03 03:04:10 +08:00
xuiscene_base.h Initial commit 2026-03-01 12:16:08 +08:00