Repository navigation
Texture group caps: per-path max texture size applied at load - #167
Closed
CCP-Stefano wants to merge 1 commit into
Closed
CCP-Stefano wants to merge 1 commit into
CCP-Stefano wants to merge 1 commit into
Conversation
trinity.SetTextureGroupCaps(list) sets an ordered list of (path substring, max size) rules; AddTextureGroupCap(pattern, maxSize) and ClearTextureGroupCaps() edit it. When a 2D DDS loads, TriTextureRes::DoLoad reads its header and skips top mips until the larger side fits the first matching rule's max size (never past the last mip), so a capped texture never reads, uploads or keeps those mips. The reader takes the larger of that skip and the quality skip. A max size that is not a power of two rounds down. Folders excluded from the quality skip are excluded from caps. The table is swapped whole under a mutex, so a load on any thread sees the old table or the new one. An empty list (the default) loads exactly as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Author
|
Closing: experimental work, opened by mistake for CI only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lets a game cap texture resolution per group of assets (by path substring), similar to texture groups in other engines.
trinity.SetTextureGroupCaps([(pattern, maxSize), ...])replaces the rule table in one swap;AddTextureGroupCap/ClearTextureGroupCapsedit it.TriTextureRes::DoLoadreads its header and skips top mips until the larger side fits the first matching rule. Combined with the quality skip, the larger skip wins. Never skips past the last mip; non power of two sizes round down.Tested on Windows DX12 (TrinityDev): a 4096 texture with 11 mips under a 2048 cap loads at 2048; uncapped textures unchanged. Draft: opened for CI coverage (macOS has not been built locally).
🤖 Generated with Claude Code