Skip to content

[TF2] Don't resample generated item model panel textures - #2001

Open
Tkain wants to merge 1 commit into
ValveSoftware:masterfrom
Tkain:itemmodelpanel-sampling-fix
Open

[TF2] Don't resample generated item model panel textures#2001
Tkain wants to merge 1 commit into
ValveSoftware:masterfrom
Tkain:itemmodelpanel-sampling-fix

Conversation

@Tkain

@Tkain Tkain commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description

TF2's item model panel will automatically generate icon textures for items without pre-rendered icons (ex. any weapon with a war paint or festivizer). These textures are sized to the exact dimensions of the item model panel that uses them, so they shouldn't need any filtering to look correct wherever they are used. Despite this, these textures are still resampled when they are rendered, causing them to look slightly blurred:

Before (with filtering)

This PR configures item model panels' auto-generated textures to always use point sampling, allowing them to be rendered pixel-perfectly without any filtering artifacts:

With this PR (no filtering)

(Note: I would appreciate if anyone could test this PR on a 4K monitor to ensure this doesn't create any visual regressions on high-res displays.)

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