mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Use premultiplied alpha for plDynamicTextMaps on GUI controls.
This fixes the irregular dark fringes around light text when not exactly pixel-aligned that are caused by independent interpolation of color and alpha. It also makes calculations simpler for things to come.
This commit is contained in:
@ -695,7 +695,7 @@ hsBool pfGUIControlMod::ISetUpDynTextMap( plPipeline *pipe )
|
||||
extraH -= height;
|
||||
|
||||
fDynTextMap->Reset();
|
||||
fDynTextMap->Create( width, height, HasFlag( kXparentBgnd ), extraW, extraH );
|
||||
fDynTextMap->Create( width, height, HasFlag( kXparentBgnd ), extraW, extraH, true );
|
||||
|
||||
fDynTextMap->SetFont( GetColorScheme()->fFontFace, GetColorScheme()->fFontSize, GetColorScheme()->fFontFlags,
|
||||
HasFlag( kXparentBgnd ) ? false : true );
|
||||
@ -706,6 +706,7 @@ hsBool pfGUIControlMod::ISetUpDynTextMap( plPipeline *pipe )
|
||||
// out with 1:1 mapping from textel to pixel
|
||||
plLayer *layer = (plLayer *)fDynTextLayer;
|
||||
layer->SetTransform( fDynTextMap->GetLayerTransform() );
|
||||
layer->SetBlendFlags( layer->GetBlendFlags() | hsGMatState::kBlendAlphaPremultiplied );
|
||||
|
||||
// Let the derived classes do their things
|
||||
IPostSetUpDynTextMap();
|
||||
|
Reference in New Issue
Block a user