summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ryan Holtz <rholtz@batcountryentertainment.com>2011-05-31 13:53:25 +0000
committer Ryan Holtz <rholtz@batcountryentertainment.com>2011-05-31 13:53:25 +0000
commitf42b5ccda0d819869951538876e8cb8a0433d77b (patch)
tree0e82d407707cfcc4192e7c19e9bed704ea9e7b25
parent7418f28a638b43aadccc5149340817eca5a69486 (diff)
No whatsnew
Attempting to fix the HLSL 'blurriness' reported by a few people. Now HLSL will auto-prescale to the nearest texture size that is greater than the target screen size on both axes and is also an even multiple of the raw bitmap's size.
-rw-r--r--hlsl/deconverge.fx4
-rw-r--r--hlsl/phosphor.fx4
-rw-r--r--hlsl/post.fx2
-rw-r--r--hlsl/prescale.fx3
-rw-r--r--src/osd/windows/drawd3d.c86
-rw-r--r--src/osd/windows/winmain.c4
-rw-r--r--src/osd/windows/winmain.h4
7 files changed, 53 insertions, 54 deletions
diff --git a/hlsl/deconverge.fx b/hlsl/deconverge.fx
index bb56c56274b..38651a060d4 100644
--- a/hlsl/deconverge.fx
+++ b/hlsl/deconverge.fx
@@ -117,8 +117,8 @@ float4 ps_main(PS_INPUT Input) : COLOR
Deconverge = 1.0f;//clamp(Deconverge, 0.0f, 1.0f);
float Alpha = tex2D(DiffuseSampler, Input.TexCoord).a;
- float2 TargetDims = float2(RawWidth * Prescale, RawHeight * Prescale);
- float2 DimOffset = 0.5f / TargetDims;
+ float2 TargetDims = float2(RawWidth, RawHeight);
+ float2 DimOffset = 0.0f / TargetDims;
float2 TexCoord = Input.TexCoord;
float2 RedCoord = Input.RedCoord;
float2 GrnCoord = Input.GrnCoord;
diff --git a/hlsl/phosphor.fx b/hlsl/phosphor.fx
index 5f94828dfc3..d7d50f8efab 100644
--- a/hlsl/phosphor.fx
+++ b/hlsl/phosphor.fx
@@ -79,7 +79,7 @@ VS_OUTPUT vs_main(VS_INPUT Input)
float2 InvTexSize = float2(1.0f / TargetWidth, 1.0f / TargetHeight);
Output.TexCoord = Input.TexCoord + 0.5f * InvTexSize;
- Output.PrevCoord = Input.TexCoord;// + 0.5f * InvTexSize;
+ Output.PrevCoord = Output.TexCoord;
return Output;
}
@@ -101,7 +101,7 @@ float4 ps_main(PS_INPUT Input) : COLOR
float GreenMax = max(CurrPix.g, PrevPix.g);
float BlueMax = max(CurrPix.b, PrevPix.b);
- return CurrPix;//float4(RedMax, GreenMax, BlueMax, CurrPix.a);
+ return float4(RedMax, GreenMax, BlueMax, CurrPix.a);
}
//-----------------------------------------------------------------------------
diff --git a/hlsl/post.fx b/hlsl/post.fx
index b3c793e197f..6a148637805 100644
--- a/hlsl/post.fx
+++ b/hlsl/post.fx
@@ -129,7 +129,7 @@ float4 ps_main(PS_INPUT Input) : COLOR
float PincushionR2 = pow(length(PinUnitCoord), 2.0f) / pow(length(Ratios), 2.0f);
float2 PincushionCurve = PinUnitCoord * PincushionAmount * PincushionR2;
float2 BaseCoord = Input.TexCoord;
- float2 ScanCoord = BaseCoord - 0.5f / (float2(RawWidth, RawHeight) * Ratios);
+ float2 ScanCoord = BaseCoord - 0.5f / float2(TargetWidth, TargetHeight);
BaseCoord -= 0.5f / Ratios;
BaseCoord *= 1.0f - PincushionAmount * Ratios * 0.2f; // Warning: Magic constant
diff --git a/hlsl/prescale.fx b/hlsl/prescale.fx
index 633b0872d48..6b3dff8d058 100644
--- a/hlsl/prescale.fx
+++ b/hlsl/prescale.fx
@@ -72,7 +72,8 @@ float4 ps_main(PS_INPUT Input) : COLOR
{
float2 RawDims = float2(RawWidth, RawHeight);
float2 TexCoord = Input.TexCoord * RawDims;
- TexCoord -= frac(float2(0.0f, TexCoord.y));
+ TexCoord -= frac(TexCoord);
+ TexCoord += 0.5f;
TexCoord /= RawDims;
float4 Center = tex2D(DiffuseSampler, TexCoord);
diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c
index 572a56f30ec..8bf8dcbf449 100644
--- a/src/osd/windows/drawd3d.c
+++ b/src/osd/windows/drawd3d.c
@@ -371,8 +371,6 @@ struct _d3d_info
bool yiq_enable; // HLSL YIQ-convolution flag
int hlsl_prescale_size; // HLSL prescale size
int hlsl_preset; // HLSL preset, if relevant
- float oversample_x; // render target oversampling factor (width) for shader prettification
- float oversample_y; // render target oversampling factor (height) for shader prettification
bitmap_t * shadow_bitmap; // shadow mask bitmap for post-processing shader
texture_info * shadow_texture; // shadow mask texture for post-processing shader
int registered_targets; // Number of registered HLSL targets (i.e., screens)
@@ -1520,8 +1518,6 @@ try_again:
d3d->create_error_count = 0;
mame_printf_verbose("Direct3D: Device created at %dx%d\n", d3d->width, d3d->height);
- d3d->oversample_x = downcast<windows_options &>(d3d->window->machine().options()).screen_oversample_x();
- d3d->oversample_y = downcast<windows_options &>(d3d->window->machine().options()).screen_oversample_y();
d3d->hlsl_snap_width = downcast<windows_options &>(d3d->window->machine().options()).d3d_snap_width();
d3d->hlsl_snap_height = downcast<windows_options &>(d3d->window->machine().options()).d3d_snap_height();
@@ -1803,7 +1799,7 @@ static int device_create_resources(d3d_info *d3d)
// experimental: initialize some more things if we're using HLSL
if(d3d->hlsl_enable && d3dintf->post_fx_available)
{
- result = (*d3dintf->device.create_texture)(d3d->device, (int)(d3d->width * d3d->oversample_x), (int)(d3d->height * d3d->oversample_y), 1, D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &d3d->hlsl_avi_copy_texture);
+ result = (*d3dintf->device.create_texture)(d3d->device, (int)(d3d->hlsl_snap_width), (int)(d3d->hlsl_snap_height), 1, D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &d3d->hlsl_avi_copy_texture);
if (result != D3D_OK)
{
mame_printf_verbose("Direct3D: Unable to init system-memory target for HLSL AVI dumping (%08x)\n", (UINT32)result);
@@ -1811,7 +1807,7 @@ static int device_create_resources(d3d_info *d3d)
}
(*d3dintf->texture.get_surface_level)(d3d->hlsl_avi_copy_texture, 0, &d3d->hlsl_avi_copy_surface);
- result = (*d3dintf->device.create_texture)(d3d->device, (int)(d3d->width * d3d->oversample_x), (int)(d3d->height * d3d->oversample_y), 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsl_avi_final_texture);
+ result = (*d3dintf->device.create_texture)(d3d->device, (int)(d3d->hlsl_snap_width), (int)(d3d->hlsl_snap_height), 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsl_avi_final_texture);
if (result != D3D_OK)
{
mame_printf_verbose("Direct3D: Unable to init video-memory target for HLSL AVI dumping (%08x)\n", (UINT32)result);
@@ -2159,7 +2155,7 @@ static int device_verify_caps(d3d_info *d3d, win_window_info *window)
d3d->hlsl_enable = downcast<windows_options &>(window->machine().options()).d3d_hlsl_enable() && d3dintf->post_fx_available;
d3d->yiq_enable = downcast<windows_options &>(window->machine().options()).screen_yiq_enable();
- d3d->hlsl_prescale_size = downcast<windows_options &>(window->machine().options()).d3d_hlsl_prescale_size();
+ d3d->hlsl_prescale_size = 1;
d3d->hlsl_preset = downcast<windows_options &>(window->machine().options()).d3d_hlsl_preset();
result = (*d3dintf->d3d.get_caps_dword)(d3dintf, d3d->adapter, D3DDEVTYPE_HAL, CAPS_MAX_PS30_INSN_SLOTS, &tempcaps);
@@ -3616,13 +3612,13 @@ static void hlsl_avi_update_snap(d3d_info *d3d, d3d_surface *surface)
D3DLOCKED_RECT rect;
// if we don't have a bitmap, or if it's not the right size, allocate a new one
- if (d3d->hlsl_avi_snap == NULL || (int)((float)d3d->width * d3d->oversample_x) != d3d->hlsl_avi_snap->width || (int)((float)d3d->height * d3d->oversample_y) != d3d->hlsl_avi_snap->height)
+ if (d3d->hlsl_avi_snap == NULL || (int)(d3d->hlsl_snap_width) != d3d->hlsl_avi_snap->width || (int)(d3d->hlsl_snap_height) != d3d->hlsl_avi_snap->height)
{
if (d3d->hlsl_avi_snap != NULL)
{
auto_free(d3d->window->machine(), d3d->hlsl_avi_snap);
}
- d3d->hlsl_avi_snap = auto_alloc(d3d->window->machine(), bitmap_t((int)((float)d3d->width * d3d->oversample_x), (int)((float)d3d->height * d3d->oversample_y), BITMAP_FORMAT_RGB32));
+ d3d->hlsl_avi_snap = auto_alloc(d3d->window->machine(), bitmap_t((int)(d3d->hlsl_snap_width), (int)(d3d->hlsl_snap_height), BITMAP_FORMAT_RGB32));
}
// copy the texture
@@ -3642,12 +3638,12 @@ static void hlsl_avi_update_snap(d3d_info *d3d, d3d_surface *surface)
}
// loop over Y
- for (int srcy = 0; srcy < (int)((float)d3d->height * d3d->oversample_y); srcy++)
+ for (int srcy = 0; srcy < (int)d3d->hlsl_snap_height; srcy++)
{
BYTE *src = (BYTE *)rect.pBits + srcy * rect.Pitch;
BYTE *dst = (BYTE *)d3d->hlsl_avi_snap->base + srcy * d3d->hlsl_avi_snap->rowpixels * 4;
- for(int x = 0; x < (int)((float)d3d->width * d3d->oversample_x); x++)
+ for(int x = 0; x < d3d->hlsl_snap_width; x++)
{
*dst++ = *src++;
*dst++ = *src++;
@@ -3844,8 +3840,8 @@ static void begin_hlsl_avi_recording(d3d_info *d3d, const char *name)
info.video_timescale = 1000 * ((d3d->window->machine().primary_screen != NULL) ? ATTOSECONDS_TO_HZ(d3d->window->machine().primary_screen->frame_period().attoseconds) : screen_device::DEFAULT_FRAME_RATE);
info.video_sampletime = 1000;
info.video_numsamples = 0;
- info.video_width = d3d->width * d3d->oversample_x;
- info.video_height = d3d->height * d3d->oversample_y;
+ info.video_width = d3d->hlsl_snap_width;
+ info.video_height = d3d->hlsl_snap_height;
info.video_depth = 24;
info.audio_format = 0;
@@ -3976,48 +3972,52 @@ static texture_info *texture_create(d3d_info *d3d, const render_texinfo *texsour
{
int idx = d3d->registered_targets;
- result = (*d3dintf->device.create_texture)(d3d->device, (int)(d3d->width * d3d->oversample_x), (int)(d3d->height * d3d->oversample_y), 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture0[idx]);
- if (result != D3D_OK)
- goto error;
- (*d3dintf->texture.get_surface_level)(d3d->hlsltexture0[idx], 0, &d3d->hlsltarget0[idx]);
+ // Find the nearest prescale factor that is over our screen size
+ int hlsl_prescale = 1;
+ while(texture->rawwidth * hlsl_prescale < d3d->width) hlsl_prescale++;
+ while(texture->rawheight * hlsl_prescale < d3d->height) hlsl_prescale++;
+ d3d->hlsl_prescale_size = hlsl_prescale;
- result = (*d3dintf->device.create_texture)(d3d->device, (int)(d3d->width * d3d->oversample_x), (int)(d3d->height * d3d->oversample_y), 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->last_hlsltexture[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, texture->rawwidth * hlsl_prescale, texture->rawheight * hlsl_prescale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture0[idx]);
if (result != D3D_OK)
goto error;
- (*d3dintf->texture.get_surface_level)(d3d->last_hlsltexture[idx], 0, &d3d->last_hlsltarget[idx]);
+ (*d3dintf->texture.get_surface_level)(d3d->hlsltexture0[idx], 0, &d3d->hlsltarget0[idx]);
- result = (*d3dintf->device.create_texture)(d3d->device, (int)(d3d->width * d3d->oversample_x), (int)(d3d->height * d3d->oversample_y), 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture1[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, texture->rawwidth * hlsl_prescale, texture->rawheight * hlsl_prescale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture1[idx]);
if (result != D3D_OK)
goto error;
(*d3dintf->texture.get_surface_level)(d3d->hlsltexture1[idx], 0, &d3d->hlsltarget1[idx]);
- result = (*d3dintf->device.create_texture)(d3d->device, (int)(d3d->width * d3d->oversample_x), (int)(d3d->height * d3d->oversample_y), 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture2[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, texture->rawwidth * hlsl_prescale, texture->rawheight * hlsl_prescale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture2[idx]);
if (result != D3D_OK)
goto error;
(*d3dintf->texture.get_surface_level)(d3d->hlsltexture2[idx], 0, &d3d->hlsltarget2[idx]);
- result = (*d3dintf->device.create_texture)(d3d->device, texture->rawwidth, texture->rawheight, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture3[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, texture->rawwidth * hlsl_prescale, texture->rawheight * hlsl_prescale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture3[idx]);
if (result != D3D_OK)
goto error;
(*d3dintf->texture.get_surface_level)(d3d->hlsltexture3[idx], 0, &d3d->hlsltarget3[idx]);
- result = (*d3dintf->device.create_texture)(d3d->device, texture->rawwidth, texture->rawheight, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture4[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, texture->rawwidth * hlsl_prescale, texture->rawheight * hlsl_prescale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture4[idx]);
if (result != D3D_OK)
goto error;
(*d3dintf->texture.get_surface_level)(d3d->hlsltexture4[idx], 0, &d3d->hlsltarget4[idx]);
- int scale = d3d->hlsl_prescale_size;
-
- result = (*d3dintf->device.create_texture)(d3d->device, texture->rawwidth * scale, texture->rawheight * scale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlslsmalltexture0[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, texture->rawwidth, texture->rawheight, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlslsmalltexture0[idx]);
if (result != D3D_OK)
goto error;
(*d3dintf->texture.get_surface_level)(d3d->hlslsmalltexture0[idx], 0, &d3d->hlslsmalltarget0[idx]);
- result = (*d3dintf->device.create_texture)(d3d->device, texture->rawwidth * scale, texture->rawheight * scale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlslprescaletexture0[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, texture->rawwidth * hlsl_prescale, texture->rawheight * hlsl_prescale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlslprescaletexture0[idx]);
if (result != D3D_OK)
goto error;
(*d3dintf->texture.get_surface_level)(d3d->hlslprescaletexture0[idx], 0, &d3d->hlslprescaletarget0[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, d3d->width, d3d->height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->last_hlsltexture[idx]);
+ if (result != D3D_OK)
+ goto error;
+ (*d3dintf->texture.get_surface_level)(d3d->last_hlsltexture[idx], 0, &d3d->last_hlsltarget[idx]);
+
texture->target_index = d3d->registered_targets;
d3d->target_use_count[texture->target_index] = 60;
d3d->target_in_use[texture->target_index] = texture;
@@ -4067,48 +4067,52 @@ static texture_info *texture_create(d3d_info *d3d, const render_texinfo *texsour
{
int idx = d3d->registered_targets;
- result = (*d3dintf->device.create_texture)(d3d->device, (int)(scwidth * d3d->oversample_x), (int)(scheight * d3d->oversample_y), 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture0[idx]);
- if (result != D3D_OK)
- goto error;
- (*d3dintf->texture.get_surface_level)(d3d->hlsltexture0[idx], 0, &d3d->hlsltarget0[idx]);
+ // Find the nearest prescale factor that is over our screen size
+ int hlsl_prescale = 1;
+ while(texture->rawwidth * hlsl_prescale < d3d->width) hlsl_prescale++;
+ while(texture->rawheight * hlsl_prescale < d3d->height) hlsl_prescale++;
+ d3d->hlsl_prescale_size = hlsl_prescale;
- result = (*d3dintf->device.create_texture)(d3d->device, (int)(scwidth * d3d->oversample_x), (int)(scheight * d3d->oversample_y), 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->last_hlsltexture[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, scwidth * hlsl_prescale, scheight * hlsl_prescale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture0[idx]);
if (result != D3D_OK)
goto error;
- (*d3dintf->texture.get_surface_level)(d3d->last_hlsltexture[idx], 0, &d3d->last_hlsltarget[idx]);
+ (*d3dintf->texture.get_surface_level)(d3d->hlsltexture0[idx], 0, &d3d->hlsltarget0[idx]);
- result = (*d3dintf->device.create_texture)(d3d->device, (int)(scwidth * d3d->oversample_x), (int)(scheight * d3d->oversample_y), 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture1[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, scwidth * hlsl_prescale, scheight * hlsl_prescale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture1[idx]);
if (result != D3D_OK)
goto error;
(*d3dintf->texture.get_surface_level)(d3d->hlsltexture1[idx], 0, &d3d->hlsltarget1[idx]);
- result = (*d3dintf->device.create_texture)(d3d->device, (int)(scwidth * d3d->oversample_x), (int)(scheight * d3d->oversample_y), 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture2[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, scwidth * hlsl_prescale, scheight * hlsl_prescale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture2[idx]);
if (result != D3D_OK)
goto error;
(*d3dintf->texture.get_surface_level)(d3d->hlsltexture2[idx], 0, &d3d->hlsltarget2[idx]);
- result = (*d3dintf->device.create_texture)(d3d->device, (int)(scwidth * d3d->oversample_x), (int)(scheight * d3d->oversample_y), 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture3[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, scwidth * hlsl_prescale, scheight * hlsl_prescale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture3[idx]);
if (result != D3D_OK)
goto error;
(*d3dintf->texture.get_surface_level)(d3d->hlsltexture3[idx], 0, &d3d->hlsltarget3[idx]);
- result = (*d3dintf->device.create_texture)(d3d->device, (int)(scwidth * d3d->oversample_x), (int)(scheight * d3d->oversample_y), 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture4[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, scwidth * hlsl_prescale, scheight * hlsl_prescale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlsltexture4[idx]);
if (result != D3D_OK)
goto error;
(*d3dintf->texture.get_surface_level)(d3d->hlsltexture4[idx], 0, &d3d->hlsltarget4[idx]);
- int scale = d3d->hlsl_prescale_size;
-
- result = (*d3dintf->device.create_texture)(d3d->device, scwidth * scale, scheight * scale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlslsmalltexture0[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, scwidth, scheight, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlslsmalltexture0[idx]);
if (result != D3D_OK)
goto error;
(*d3dintf->texture.get_surface_level)(d3d->hlslsmalltexture0[idx], 0, &d3d->hlslsmalltarget0[idx]);
- result = (*d3dintf->device.create_texture)(d3d->device, scwidth * scale, scheight * scale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlslprescaletexture0[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, scwidth * hlsl_prescale, scheight * hlsl_prescale, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->hlslprescaletexture0[idx]);
if (result != D3D_OK)
goto error;
(*d3dintf->texture.get_surface_level)(d3d->hlslprescaletexture0[idx], 0, &d3d->hlslprescaletarget0[idx]);
+ result = (*d3dintf->device.create_texture)(d3d->device, d3d->width, d3d->height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d->last_hlsltexture[idx]);
+ if (result != D3D_OK)
+ goto error;
+ (*d3dintf->texture.get_surface_level)(d3d->last_hlsltexture[idx], 0, &d3d->last_hlsltarget[idx]);
+
texture->target_index = d3d->registered_targets;
d3d->target_use_count[texture->target_index] = 60;
d3d->target_in_use[texture->target_index] = texture;
diff --git a/src/osd/windows/winmain.c b/src/osd/windows/winmain.c
index f33327b37d2..579862d50c3 100644
--- a/src/osd/windows/winmain.c
+++ b/src/osd/windows/winmain.c
@@ -341,8 +341,6 @@ const options_entry windows_options::s_option_entries[] =
{ WINOPTION_SHADOW_MASK_COUNT_Y";fs_shadwh", "480", OPTION_INTEGER, "shadow mask height, in phosphor dots" },
{ WINOPTION_SHADOW_MASK_USIZE";fs_shadwu(0.0-1.0)", "0.1875", OPTION_FLOAT, "shadow mask texture size in U direction" },
{ WINOPTION_SHADOW_MASK_VSIZE";fs_shadwv(0.0-1.0)", "0.1875", OPTION_FLOAT, "shadow mask texture size in V direction" },
- { WINOPTION_OVERSAMPLE_X";fs_overx(0.1-9.0)", "1.0", OPTION_FLOAT, "oversample amount in screen-relative X direction, multiple" },
- { WINOPTION_OVERSAMPLE_Y";fs_overy(0.1-9.0)", "1.0", OPTION_FLOAT, "oversample amount in screen-relative Y direction, multiple" },
{ WINOPTION_CURVATURE";fs_curv(0.0-4.0)", "0.0", OPTION_FLOAT, "screen curvature amount" },
{ WINOPTION_SCREEN_SCALE_TOP";fs_scalex(0.0-2.0)", "1.0", OPTION_FLOAT, "screen scale, top" },
{ WINOPTION_SCREEN_SCALE_BOTTOM";fs_scaley(0.0-2.0)", "1.0", OPTION_FLOAT, "screen scale, bottom" },
@@ -351,7 +349,7 @@ const options_entry windows_options::s_option_entries[] =
{ WINOPTION_SCANLINE_AMOUNT";fs_scanam(0.0-4.0)", "0.0", OPTION_FLOAT, "overall alpha scaling value for scanlines" },
{ WINOPTION_SCANLINE_SCALE";fs_scansc(0.0-4.0)", "1.0", OPTION_FLOAT, "overall height scaling value for scanlines" },
{ WINOPTION_SCANLINE_HEIGHT";fs_scanh(0.0-4.0)", "0.7", OPTION_FLOAT, "individual height scaling value for scanlines" },
- { WINOPTION_SCANLINE_BRIGHT_SCALE";fs_scanbs(0.0-1.0)", "1.0", OPTION_FLOAT, "overall brightness scaling value for scanlines (multiplicative)" },
+ { WINOPTION_SCANLINE_BRIGHT_SCALE";fs_scanbs(0.0-2.0)", "1.0", OPTION_FLOAT, "overall brightness scaling value for scanlines (multiplicative)" },
{ WINOPTION_SCANLINE_BRIGHT_OFFSET";fs_scanbo(0.0-1.0)", "0.0", OPTION_FLOAT, "overall brightness offset value for scanlines (additive)" },
{ WINOPTION_SCANLINE_OFFSET";fs_scanjt(0.0-4.0)", "0.0", OPTION_FLOAT, "overall interlace jitter scaling value for scanlines" },
{ WINOPTION_DEFOCUS_X";fs_focusx(0.0-16.0)", "0.0", OPTION_FLOAT, "overall defocus scaling value in screen-relative X direction" },
diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h
index 6c825bd5d36..fcd97c3cd68 100644
--- a/src/osd/windows/winmain.h
+++ b/src/osd/windows/winmain.h
@@ -96,8 +96,6 @@
#define WINOPTION_SCREEN_SCALE_TOP "screen_scale_top"
#define WINOPTION_SCREEN_SCALE_BOTTOM "screen_scale_bottom"
#define WINOPTION_CURVATURE "curvature"
-#define WINOPTION_OVERSAMPLE_X "oversample_x"
-#define WINOPTION_OVERSAMPLE_Y "oversample_y"
#define WINOPTION_SCANLINE_AMOUNT "scanline_alpha"
#define WINOPTION_SCANLINE_SCALE "scanline_size"
#define WINOPTION_SCANLINE_HEIGHT "scanline_height"
@@ -231,8 +229,6 @@ public:
int screen_shadow_mask_count_y() const { return int_value(WINOPTION_SHADOW_MASK_COUNT_Y); }
float screen_shadow_mask_u_size() const { return float_value(WINOPTION_SHADOW_MASK_USIZE); }
float screen_shadow_mask_v_size() const { return float_value(WINOPTION_SHADOW_MASK_VSIZE); }
- float screen_oversample_x() const { return float_value(WINOPTION_OVERSAMPLE_X); }
- float screen_oversample_y() const { return float_value(WINOPTION_OVERSAMPLE_Y); }
float screen_scanline_amount() const { return float_value(WINOPTION_SCANLINE_AMOUNT); }
float screen_scanline_scale() const { return float_value(WINOPTION_SCANLINE_SCALE); }
float screen_scanline_height() const { return float_value(WINOPTION_SCANLINE_HEIGHT); }