Skip to content

fix(plate): fix disabled white plate texture and resolve text disappearing at distance - #306

Open
CanerKaraca23 wants to merge 1 commit into
user-grinch:mainfrom
CanerKaraca23:fix/plate-disabled-texture-and-distance-visibility
Open

fix(plate): fix disabled white plate texture and resolve text disappearing at distance#306
CanerKaraca23 wants to merge 1 commit into
user-grinch:mainfrom
CanerKaraca23:fix/plate-disabled-texture-and-distance-visibility

Conversation

@CanerKaraca23

Copy link
Copy Markdown
Collaborator

Problem

  1. White Texture on Disabled Plates: When HDLicensePlate is disabled in ModelExtras.ini (HDLicensePlate = 0), LicensePlate::Init() previously still applied the plate manager hooks (CCustomCarPlateMgr_Initialise, SetupMaterialPlatebackTexture), leaving plates rendered as a flat white texture with no vanilla text generated on singleplayer or SA-MP.
  2. Text Disappearing at Distance: Mipmapping generation on plate characters (RwTextureRasterGenerateMipmaps + rwFILTERLINEARMIPLINEAR / rwFILTERMIPNEAREST) caused characters on the 256x64 dynamic raster to blur out completely and disappear into background color when viewed from moderate distances. Additionally, texture address modes were using filter enums instead of address mode enums.

Solution

  1. Early-exit in LicensePlate::Init() if !m_bEnabled before installing hooks, completely delegating plate rendering to vanilla game / SA-MP.
  2. Corrected addressing modes to rwTEXTUREADDRESSCLAMP for charset and plate textures.
  3. Switched plate texture filtering to rwFILTERLINEAR without downscaled mipmaps, keeping plate text sharp and clearly legible from distance.

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