be explicit with every blending kwarg
@@ -112,8 +112,20 @@ def fix_data_dtype(data):
BLENDING_MODES = {
- 'opaque': dict(preset='opaque'),
- 'translucent': dict(preset='translucent'),
+ 'opaque': dict(
+ depth_test=True,
+ cull_face=False,
+ blend=False,
+ blend_func=('one', 'zero'),
+ blend_equation='func_add',
+ ),
+ 'translucent': dict(
+ depth_test=True,
+ cull_face=False,
+ blend=True,
+ blend_func=('src_alpha', 'one_minus_src_alpha', 'zero', 'one'),
+ blend_equation='func_add',
+ ),
'translucent_no_depth': dict(
depth_test=False,
cull_face=False,
@@ -121,8 +133,18 @@ BLENDING_MODES = {
blend_func=('src_alpha', 'one_minus_src_alpha', 'zero', 'one'),
blend_equation='func_add', # see vispy/vispy#2324
),
- 'additive': dict(preset='additive'),
+ 'additive': dict(
+ depth_test=False,
+ cull_face=False,
+ blend=True,
+ blend_func=('src_alpha', 'one'),
+ blend_equation='func_add',
+ ),
'minimum': dict(
- depth_test=False, cull_face=False, blend=True, blend_equation='min'
+ depth_test=False,
+ cull_face=False,
+ blend=True,
+ blend_func=('one', 'one'),
+ blend_equation='min',
),
}
