HLSL Updates: [Ryan Holtz, Bat Country Entertainment]

- MAME will now save an HLSL INI file on the first run of a game that doesn't already have an INI file.
- HLSL INI files must have their parameters left in the order in which they are saved out.
- Fixed a diagonal 'crease' visible on the screen in HLSL mode.
This commit is contained in:
Ryan Holtz 2011-06-13 23:09:41 +00:00
parent e3bfde1209
commit 23976ade94
4 changed files with 534 additions and 178 deletions

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,9 @@
typedef struct _hlsl_options hlsl_options;
struct _hlsl_options
{
bool params_dirty;
float shadow_mask_alpha;
char shadow_mask_texture[1024];
int shadow_mask_count_x;
int shadow_mask_count_y;
float shadow_mask_u_size;
@ -82,6 +84,18 @@ struct _hlsl_options
float floor[3];
float phosphor[3];
float saturation;
bool yiq_enable;
float yiq_cc;
float yiq_a;
float yiq_b;
float yiq_o;
float yiq_p;
float yiq_n;
float yiq_y;
float yiq_i;
float yiq_q;
float yiq_scan_time;
int yiq_phase_count;
};
class hlsl_info
@ -132,7 +146,9 @@ private:
win_window_info * window; // D3D window info
bool master_enable; // overall enable flag
bool yiq_enable; // YIQ-convolution flag
bool external_ini; // external ini flag
int prescale_force_x; // prescale force x
int prescale_force_y; // prescale force y
int prescale_size_x; // prescale size x
int prescale_size_y; // prescale size y
int preset; // preset, if relevant

View File

@ -329,8 +329,10 @@ const options_entry windows_options::s_option_entries[] =
// post-processing options
{ NULL, NULL, OPTION_HEADER, "DIRECT3D POST-PROCESSING OPTIONS" },
{ WINOPTION_HLSL_ENABLE";hlsl", "0", OPTION_BOOLEAN, "enable HLSL post-processing (PS3.0 required)" },
{ WINOPTION_HLSL_INI_NAME, "%g", OPTION_STRING, "HLSL INI file path" },
{ WINOPTION_HLSLPATH, "hlsl", OPTION_STRING, "path to hlsl files" },
{ WINOPTION_HLSL_PRESCALE_SIZE, "3", OPTION_INTEGER, "HLSL scaling pre-pass factor (usually 2 or 3)" },
{ WINOPTION_HLSL_PRESCALE_X, "0", OPTION_INTEGER, "HLSL pre-scale override factor for X (0 for auto)" },
{ WINOPTION_HLSL_PRESCALE_Y, "0", OPTION_INTEGER, "HLSL pre-scale override factor for Y (0 for auto)" },
{ WINOPTION_HLSL_PRESET";(-1-3)", "-1", OPTION_INTEGER, "HLSL preset to use (0-3)" },
{ WINOPTION_HLSL_WRITE, NULL, OPTION_STRING, "enable HLSL AVI writing (huge disk bandwidth suggested)" },
{ WINOPTION_HLSL_SNAP_WIDTH, "2048", OPTION_STRING, "HLSL upscaled-snapshot width" },

View File

@ -81,7 +81,9 @@
// core post-processing options
#define WINOPTION_HLSL_ENABLE "hlsl_enable"
#define WINOPTION_HLSLPATH "hlslpath"
#define WINOPTION_HLSL_PRESCALE_SIZE "hlsl_prescale_size"
#define WINOPTION_HLSL_INI_NAME "hlslini"
#define WINOPTION_HLSL_PRESCALE_X "hlsl_prescale_x"
#define WINOPTION_HLSL_PRESCALE_Y "hlsl_prescale_y"
#define WINOPTION_HLSL_PRESET "hlsl_preset"
#define WINOPTION_HLSL_WRITE "hlsl_write"
#define WINOPTION_HLSL_SNAP_WIDTH "hlsl_snap_width"
@ -191,9 +193,11 @@ public:
// core post-processing options
const char *screen_post_fx_dir() const { return value(WINOPTION_HLSLPATH); }
const char *hlsl_ini_name() const { return value(WINOPTION_HLSL_INI_NAME); }
bool d3d_hlsl_enable() const { return bool_value(WINOPTION_HLSL_ENABLE); }
const char *d3d_hlsl_write() const { return value(WINOPTION_HLSL_WRITE); }
int d3d_hlsl_prescale_size() const { return int_value(WINOPTION_HLSL_PRESCALE_SIZE); }
int d3d_hlsl_prescale_x() const { return int_value(WINOPTION_HLSL_PRESCALE_X); }
int d3d_hlsl_prescale_y() const { return int_value(WINOPTION_HLSL_PRESCALE_Y); }
int d3d_hlsl_preset() const { return int_value(WINOPTION_HLSL_PRESET); }
int d3d_snap_width() const { return int_value(WINOPTION_HLSL_SNAP_WIDTH); }
int d3d_snap_height() const { return int_value(WINOPTION_HLSL_SNAP_HEIGHT); }