summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatarGravatar Ryan Holtz <rholtz@batcountryentertainment.com>2011-05-24 00:23:40 +0000
committerGravatarGravatar Ryan Holtz <rholtz@batcountryentertainment.com>2011-05-24 00:23:40 +0000
commit6760f6a40c1d98df84e3880005f874582f878c1c (patch)
tree59a887396552a8840ff4535f12d5a817ed7c3936
parent95f06e11a8766e27e7c955e48ea9b84e533624fb (diff)
HLSL bugfxes, nwn
-rw-r--r--hlsl/deconverge.fx15
-rw-r--r--hlsl/focus.fx1
-rw-r--r--src/emu/uimenu.c3
-rw-r--r--src/osd/windows/drawd3d.c10
4 files changed, 20 insertions, 9 deletions
diff --git a/hlsl/deconverge.fx b/hlsl/deconverge.fx
index 5b46ca1ddb6..c5630666918 100644
--- a/hlsl/deconverge.fx
+++ b/hlsl/deconverge.fx
@@ -112,12 +112,25 @@ float4 ps_main(PS_INPUT Input) : COLOR
float2 MagnetCenter = float2(0.9f / WidthRatio, 0.9f / HeightRatio);
float MagnetDistance = length((MagnetCenter - Input.TexCoord) * float2(WidthRatio, HeightRatio));
float Deconverge = 1.0f - MagnetDistance / MagnetCenter;
- Deconverge = clamp(Deconverge, 0.0f, 1.0f);
+ Deconverge = 1.0f;//clamp(Deconverge, 0.0f, 1.0f);
float Alpha = tex2D(DiffuseSampler, Input.TexCoord).a;
float RedTexel = tex2D(DiffuseSampler, lerp(Input.TexCoord, Input.RedCoord, Deconverge) + 0.5f / float2(RawWidth, RawHeight)).r;
float GrnTexel = tex2D(DiffuseSampler, lerp(Input.TexCoord, Input.GrnCoord, Deconverge) + 0.5f / float2(RawWidth, RawHeight)).g;
float BluTexel = tex2D(DiffuseSampler, lerp(Input.TexCoord, Input.BluCoord, Deconverge) + 0.5f / float2(RawWidth, RawHeight)).b;
+ RedTexel *= Input.RedCoord.x < (1.0f / TargetWidth) ? 0.0f : 1.0f;
+ RedTexel *= Input.RedCoord.y < (1.0f / TargetHeight) ? 0.0f : 1.0f;
+ RedTexel *= Input.RedCoord.x > (1.0f / WidthRatio) ? 0.0f : 1.0f;
+ RedTexel *= Input.RedCoord.y > (1.0f / HeightRatio) ? 0.0f : 1.0f;
+ GrnTexel *= Input.GrnCoord.x < (1.0f / TargetWidth) ? 0.0f : 1.0f;
+ GrnTexel *= Input.GrnCoord.y < (1.0f / TargetHeight) ? 0.0f : 1.0f;
+ GrnTexel *= Input.GrnCoord.x > (1.0f / WidthRatio) ? 0.0f : 1.0f;
+ GrnTexel *= Input.GrnCoord.y > (1.0f / HeightRatio) ? 0.0f : 1.0f;
+ BluTexel *= Input.BluCoord.x < (1.0f / TargetWidth) ? 0.0f : 1.0f;
+ BluTexel *= Input.BluCoord.y < (1.0f / TargetHeight) ? 0.0f : 1.0f;
+ BluTexel *= Input.BluCoord.x > (1.0f / WidthRatio) ? 0.0f : 1.0f;
+ BluTexel *= Input.BluCoord.y > (1.0f / HeightRatio) ? 0.0f : 1.0f;
+
return float4(RedTexel, GrnTexel, BluTexel, Alpha);
}
diff --git a/hlsl/focus.fx b/hlsl/focus.fx
index d5bd17971f1..d84b6b96922 100644
--- a/hlsl/focus.fx
+++ b/hlsl/focus.fx
@@ -92,6 +92,7 @@ VS_OUTPUT vs_main(VS_INPUT Input)
float2 InvTexSize = float2(1.0f / TargetWidth, 1.0f / TargetHeight);
float2 TexCoord = (Input.Position.xy * InvTexSize);
+ TexCoord = TexCoord + 0.5f * InvTexSize;
float2 DefocusVal = float2(DefocusX, DefocusY);
Output.TexCoord0 = TexCoord + Coord0Offset * InvTexSize * DefocusVal;
Output.TexCoord1 = TexCoord + Coord1Offset * InvTexSize * DefocusVal;
diff --git a/src/emu/uimenu.c b/src/emu/uimenu.c
index 18034e6e13d..2fff505605f 100644
--- a/src/emu/uimenu.c
+++ b/src/emu/uimenu.c
@@ -3026,9 +3026,6 @@ static void menu_sliders_populate(running_machine &machine, ui_menu *menu, int m
if (curval < curslider->maxval)
flags |= MENU_FLAG_RIGHT_ARROW;
ui_menu_item_append(menu, curslider->description, tempstring, flags, (void *)curslider);
-
- if (menuless_mode)
- break;
}
ui_menu_set_custom_render(menu, menu_sliders_custom_render, 0.0f, 2.0f * ui_get_line_height(machine) + 2.0f * UI_BOX_TB_BORDER);
diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c
index 3f4f2b5cf03..922e16c5879 100644
--- a/src/osd/windows/drawd3d.c
+++ b/src/osd/windows/drawd3d.c
@@ -650,8 +650,8 @@ static slider_state *init_slider_list(d3d_info *d3d)
}
*tailptr = slider_alloc(d3d->window->machine(), "Shadow Mask Darkness", 0, 0, 100, 1, slider_shadow_mask_alpha, (void*)d3d); tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(d3d->window->machine(), "Shadow Mask X Count", 1, 640, 1024, 0, slider_shadow_mask_x_count, (void*)d3d); tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(d3d->window->machine(), "Shadow Mask Y Count", 1, 640, 1024, 0, slider_shadow_mask_y_count, (void*)d3d); tailptr = &(*tailptr)->next;
+ *tailptr = slider_alloc(d3d->window->machine(), "Shadow Mask X Count", 1, 640, 1024, 1, slider_shadow_mask_x_count, (void*)d3d); tailptr = &(*tailptr)->next;
+ *tailptr = slider_alloc(d3d->window->machine(), "Shadow Mask Y Count", 1, 480, 1024, 1, slider_shadow_mask_y_count, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Shadow Mask Pixel Count X", 1, 3, 32, 1, slider_shadow_mask_usize, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Shadow Mask Pixel Count Y", 1, 3, 32, 1, slider_shadow_mask_vsize, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Screen Curvature", 0, 0, 100, 1, slider_curvature, (void*)d3d); tailptr = &(*tailptr)->next;
@@ -675,15 +675,15 @@ static slider_state *init_slider_list(d3d_info *d3d)
*tailptr = slider_alloc(d3d->window->machine(), "Green Convergence Y", -1500, 0, 1500, 1, slider_green_radial_converge_y, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Blue Convergence X", -1500, 0, 1500, 1, slider_blue_radial_converge_x, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Blue Convergence Y", -1500, 0, 1500, 1, slider_blue_radial_converge_y, (void*)d3d); tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(d3d->window->machine(), "Red Output from Red Input", -400, 200, 400, 5, slider_red_from_r, (void*)d3d); tailptr = &(*tailptr)->next;
+ *tailptr = slider_alloc(d3d->window->machine(), "Red Output from Red Input", -400, 0, 400, 5, slider_red_from_r, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Red Output from Green Input", -400, 0, 400, 5, slider_red_from_g, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Red Output from Blue Input", -400, 0, 400, 5, slider_red_from_b, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Green Output from Red Input", -400, 0, 400, 5, slider_green_from_r, (void*)d3d); tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(d3d->window->machine(), "Green Output from Green Input", -400, 200, 400, 5, slider_green_from_g, (void*)d3d); tailptr = &(*tailptr)->next;
+ *tailptr = slider_alloc(d3d->window->machine(), "Green Output from Green Input", -400, 0, 400, 5, slider_green_from_g, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Green Output from Blue Input", -400, 0, 400, 5, slider_green_from_b, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Blue Output from Red Input", -400, 0, 400, 5, slider_blue_from_r, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Blue Output from Green Input", -400, 0, 400, 5, slider_blue_from_g, (void*)d3d); tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(d3d->window->machine(), "Blue Output from Blue Input", -400, 200, 400, 5, slider_blue_from_b, (void*)d3d); tailptr = &(*tailptr)->next;
+ *tailptr = slider_alloc(d3d->window->machine(), "Blue Output from Blue Input", -400, 0, 400, 5, slider_blue_from_b, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Red DC Offset", -100, 0, 100, 1, slider_red_offset, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Green DC Offset", -100, 0, 100, 1, slider_green_offset, (void*)d3d); tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(d3d->window->machine(), "Blue DC Offset", -100, 0, 100, 1, slider_blue_offset, (void*)d3d); tailptr = &(*tailptr)->next;