diff --git a/src/burner/win32/app.rc b/src/burner/win32/app.rc index dfecd1a51e..5cfbb563bf 100644 --- a/src/burner/win32/app.rc +++ b/src/burner/win32/app.rc @@ -1453,6 +1453,7 @@ BEGIN MENUITEM "CRT Easy Mode", MENU_DX9_ALT_HARD_FX_CRT_EASY_MODE MENUITEM "CRT Standard", MENU_DX9_ALT_HARD_FX_CRT_STANDARD MENUITEM "CRT Bicubic", MENU_DX9_ALT_HARD_FX_CRT_BICUBIC + MENUITEM "CRT Retro Scanlines", MENU_DX9_ALT_HARD_FX_CRT_RETROSL MENUITEM "CRT CGA", MENU_DX9_ALT_HARD_FX_CRT_CGA END POPUP "SoftFX algorithm" diff --git a/src/burner/win32/resource.h b/src/burner/win32/resource.h index 9c97cd5a8f..5c4a67e796 100644 --- a/src/burner/win32/resource.h +++ b/src/burner/win32/resource.h @@ -895,8 +895,9 @@ #define MENU_DX9_ALT_HARD_FX_CRT_EASY_MODE 11454 #define MENU_DX9_ALT_HARD_FX_CRT_STANDARD 11455 #define MENU_DX9_ALT_HARD_FX_CRT_BICUBIC 11456 -#define MENU_DX9_ALT_HARD_FX_CRT_CGA 11457 -#define MENU_DX9_ALT_HARD_FX_LAST 11457 // last one +#define MENU_DX9_ALT_HARD_FX_CRT_RETROSL 11457 +#define MENU_DX9_ALT_HARD_FX_CRT_CGA 11458 +#define MENU_DX9_ALT_HARD_FX_LAST 11459 // last one #define MENU_DX9_ALT_SOFT_AUTOSIZE 11490 #define MENU_DX9_ALT_FORCE_16BIT 11491 diff --git a/src/burner/win32/scrn.cpp b/src/burner/win32/scrn.cpp index 4dd9e7ac68..65493b7f09 100644 --- a/src/burner/win32/scrn.cpp +++ b/src/burner/win32/scrn.cpp @@ -3439,6 +3439,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify) case MENU_DX9_ALT_HARD_FX_CRT_EASY_MODE: case MENU_DX9_ALT_HARD_FX_CRT_STANDARD: case MENU_DX9_ALT_HARD_FX_CRT_BICUBIC: + case MENU_DX9_ALT_HARD_FX_CRT_RETROSL: case MENU_DX9_ALT_HARD_FX_CRT_CGA: nVidDX9HardFX = id - MENU_DX9_ALT_HARD_FX_NONE; break; diff --git a/src/intf/video/win32/vid_directx9.cpp b/src/intf/video/win32/vid_directx9.cpp index 97d9aa311a..26db61cdec 100644 --- a/src/intf/video/win32/vid_directx9.cpp +++ b/src/intf/video/win32/vid_directx9.cpp @@ -1797,6 +1797,7 @@ char *HardFXFilenames[] = { "support/shaders/crt_easymode.fx", "support/shaders/crt_standard.fx", "support/shaders/crt_bicubic.fx", + "support/shaders/crt_retrosl.fx", "support/shaders/crt_cga.fx" }; @@ -2077,6 +2078,7 @@ static int dx9AltSetHardFX(int nHardFX) // common parameters pVidEffect->SetParamFloat2("texture_size", nTextureWidth, nTextureHeight); pVidEffect->SetParamFloat2("video_size", (nRotateGame ? nGameHeight : nGameWidth) + 0.5f, nRotateGame ? nGameWidth : nGameHeight + 0.5f); + pVidEffect->SetParamFloat2("video_time", nCurrentFrame / 5, nCurrentFrame / 5); } else { @@ -2420,8 +2422,9 @@ static int dx9AltRender() // MemToSurf dx9AltSetVertex(0, 0, nWidth, nHeight, nTextureWidth, nTextureHeight, 0, 0, nImageWidth, nImageHeight); } - if (pVidEffect && pVidEffect->IsValid()) + if (pVidEffect && pVidEffect->IsValid()) { pVidEffect->SetParamFloat2("output_size", nImageWidth, nImageHeight); + } D3DVIEWPORT9 vp; @@ -2446,6 +2449,11 @@ static int dx9AltRender() // MemToSurf } } + if (pVidEffect && pVidEffect->IsValid()) { + pVidEffect->SetParamFloat2("video_time", nCurrentFrame / 5, nCurrentFrame / 5); +// pVidEffect->SetParamFloat2("user_settings", fDX9ShaderSettings[0], fDX9ShaderSettings[1]); // at some point! + } + pD3DDevice->BeginScene(); {