Add gs_blend_function_separate

This allows the ability to separate the blend states of color and alpha.

The default blend state has also changed so that alpha is always added
together to ensure that the destination image always gets an alpha value
that is actually usable after the operation (for render targets).

Old default state:
  color source: GS_BLEND_SRCALPHA, color dest: GS_BLEND_INVSRCALPHA
  alpha source: GS_BLEND_SRCALPHA, alpha dest: GS_BLEND_INVSRCALPHA

New default state:
  color source: GS_BLEND_SRCALPHA, color dest: GS_BLEND_INVSRCALPHA
  alpha source: GS_BLEND_ONE,      alpha dest: GS_BLEND_ONE
This commit is contained in:
jp9000
2015-03-27 11:18:02 -07:00
parent 95f5a3c260
commit be52fa26f9
8 changed files with 102 additions and 24 deletions

View File

@@ -95,6 +95,7 @@ bool load_graphics_imports(struct gs_exports *exports, void *module,
GRAPHICS_IMPORT(device_enable_stencil_write);
GRAPHICS_IMPORT(device_enable_color);
GRAPHICS_IMPORT(device_blend_function);
GRAPHICS_IMPORT(device_blend_function_separate);
GRAPHICS_IMPORT(device_depth_function);
GRAPHICS_IMPORT(device_stencil_function);
GRAPHICS_IMPORT(device_stencil_op);