Team Fortress 2

Team Fortress 2

Unclamped Lightwarps Fix
16
2
4
2
2
奖励
收藏
已收藏
取消收藏
其他: Community Fix
文件大小
发表于
更新日期
142.583 KB
2023 年 3 月 5 日 下午 12:19
2023 年 3 月 9 日 上午 6:06
1 项改动说明 ( 查看 )

您希望看到这件物品在《Team Fortress 2》中被官方采纳并支持吗?

是的
不,谢谢 /
不感兴趣
稍后
再询问我
描述
Clamps most of the game's unclamped lightwarps (and some phongwarps)

Explanation:
Instead of using a flat dark-to-light gradient for lighting (as you would see in HL2 or Portal for example), Team Fortress 2 uses lightwarps for most things, which replaces the normal flat lighting gradient with unique lighting gradients that gives the game its stylized shading. By default, textures in the Source Engine are tiled and have texture filtering applied, which blends nearby colors together. The combination of tiling and texture filtering being applied to a lightwarp texture causes the leftmost pixel (usually a dark color) to bleed into the rightmost pixel (usually a light color) and vice versa. What you effectively end up with is a dark-to-light gradient that has 1 pixel of light at the far left, and one pixel of dark at the far right. This causes the shading of a model to actually have a light spot where it should be at its darkest, and a dark spot where the lighting is the most intense. By marking a texture as clamped, the texture is not tiled and this problem doesn't occur. Many lightwarps in the game are in fact already clamped and don't have this issue, but there are a lot of lightwarps that aren't correctly clamped. While it may be difficult to notice this in game, as only the brightest and darkest shaded parts of a model are affected, it's a problem nonetheless.

This submission marks most lightwarps as clamped, and, in a few special cases where a texture is used as a 2D phongwarp AND a lightwarp, adds a clamped copy of the texture(this way the clamped version can be used as a lightwarp and the unclamped version as a 2D phongwarp). In these cases, the materials that reference them are updated too. Some 1D phongwarps have been clamped for similar reasons.

I've included screenshots of some of the lightwarps that are affected by this

Fixed: "models/flag/flag_blue_lightwarp.vtf" "models/flag/flag_red_lightwarp.vtf" "models/lightwarps/rainblower_lightwarp.vtf" "models/lightwarps/robot_lightwarp.vtf" "models/lightwarps/xms_lightwarp.vtf" "models/player/demo/hwn_demo_lightwarp.vtf" "models/player/items/all_class/qc_lightwarp.vtf" "models/player/items/engineer/hwn_engineer_warp.vtf" "models/player/items/mvm_loot/all_class/fob_lightwarp.vtf" "models/player/soldier/hwn_soldier_lightwarp.vtf" "models/player/shared/ice_player_lightwarp.vtf" "models/props_foliage/cactus01_lightwarp.vtf" "models/props_halloween/halloween_lens_lightwarp.vtf" "models/weapons/c_items/c_fists_of_steel_lightwarp.vtf" "models/weapons/c_items/c_fists_of_steel_lightwarp_blue.vtf" "models/weapons/c_items/c_fists_of_steel_phongwarp.vtf" "models/weapons/c_items/c_fists_of_steel_phongwarp_blue.vtf" "models/weapons/c_items/c_pocket_watch_lightwarp.vtf" "models/weapons/c_items/c_pocket_watch_phongwarp.vtf" "models/weapons/c_items/c_pomson_phongwarp.vtf" "models/weapons/c_items/c_sr3_punch_lightwarp.vtf" "models/workshop/weapons/c_models/c_fists_of_steel/c_fists_of_steel_lightwarp.vtf" "models/workshop/weapons/c_models/c_fists_of_steel/c_fists_of_steel_lightwarp_blue.vtf" "models/workshop/weapons/c_models/c_fists_of_steel/c_fists_of_steel_phongwarp.vtf" "models/workshop/weapons/c_models/c_fists_of_steel/c_fists_of_steel_phongwarp_blue.vtf" "models/workshop/weapons/c_models/c_sr3_punch/c_sr3_punch_lightwarp.vtf" Added: "models/player/items/spy/hwn_spy_warp_clamped.vtf" "models/vgui/competitive_badge_sparkle_warp_clamped.vtf" Modified Materials: "models/player/items/spy/hwn_spy_misc1_glass.vmt" "models/vgui/competitive_badge_sparkle.vmt" Some unclamped warps weren't changed because they wouldn't benefit from it: "models/props_halloween/halloween_demoeye_lightwarp.vtf" (this texture is solid black, so it wouldn't benefit from being clamped) "models/player/items/soldier/soldier_hood_warp_red.vtf" (the left-end and right-end regions of the texture are both the same color, so it wouldn't benefit from being clamped) "models/player/items/soldier/soldier_hood_warp_blue.vtf" (the left-end and right-end regions of the texture are both the same color, so it wouldn't benefit from being clamped) "models/player/items/all_class/all_class_ring_warp.vtf" (this texture is color noise so it wouldn't benefit from being clamped) "models/player/items/heavy/sr3_heavy_warp" (this texture is black and white noise so it wouldn't benefit from being clamped)