Handle weapon wheel blur shader in the event handler.
This commit is contained in:
parent
27b41a4353
commit
6392a89cb9
3 changed files with 11 additions and 12 deletions
|
|
@ -31,6 +31,14 @@ extend Class SWWMHandler
|
|||
if ( !swwm_shaders ) ClearAllShaders(true);
|
||||
return;
|
||||
}
|
||||
// handle weapon wheel shader here
|
||||
if ( wsel )
|
||||
{
|
||||
PPShader.SetEnabled("BokehSel",true);
|
||||
double salph = SWWMUtility.Lerp(wsel.olalph,wsel.alph,e.fractic);
|
||||
PPShader.SetUniform1f("BokehSel","strength",salph);
|
||||
}
|
||||
else PPShader.SetEnabled("BokehSel",false);
|
||||
let divi = DivineSpriteEffect(mo.FindInventory("DivineSpriteEffect"));
|
||||
if ( divi )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1130,11 +1130,7 @@ Class SWWMWeaponSelect : HUDMessageBase
|
|||
case 2:
|
||||
// fade out
|
||||
alph -= 6./GameTicRate;
|
||||
if ( alph <= 0. )
|
||||
{
|
||||
PPShader.SetEnabled("BokehSel",false); // clear the shader
|
||||
return true;
|
||||
}
|
||||
if ( alph <= 0. ) return true;
|
||||
break;
|
||||
}
|
||||
// smooth scroll
|
||||
|
|
@ -1152,11 +1148,6 @@ Class SWWMWeaponSelect : HUDMessageBase
|
|||
double fractic = System.GetTimeFrac();
|
||||
double ssmoothY = SWWMUtility.Lerp(olsmoothY,smoothY,fractic);
|
||||
double salph = SWWMUtility.Lerp(olalph,alph,fractic);
|
||||
if ( swwm_shaders )
|
||||
{
|
||||
PPShader.SetEnabled("BokehSel",true);
|
||||
PPShader.SetUniform1f("BokehSel","strength",salph);
|
||||
}
|
||||
Screen.Dim("Black",.4*salph,0,0,Screen.GetWidth(),Screen.GetHeight());
|
||||
double hs;
|
||||
Vector2 ss;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue