mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 09:51:10 -04:00
M_dual
This commit is contained in:
parent
0dad155cf8
commit
97d4e25f9d
@ -4894,7 +4894,6 @@ set_blend_mode(ColorWriteAttrib::Mode color_write_mode,
|
|||||||
// outside of a blend mode.
|
// outside of a blend mode.
|
||||||
if (color_write_mode == ColorWriteAttrib::M_off) {
|
if (color_write_mode == ColorWriteAttrib::M_off) {
|
||||||
enable_blend(true);
|
enable_blend(true);
|
||||||
enable_alpha_test(false);
|
|
||||||
call_dxBlendFunc(D3DBLEND_ZERO, D3DBLEND_ONE);
|
call_dxBlendFunc(D3DBLEND_ZERO, D3DBLEND_ONE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -4906,19 +4905,16 @@ set_blend_mode(ColorWriteAttrib::Mode color_write_mode,
|
|||||||
|
|
||||||
case ColorBlendAttrib::M_multiply:
|
case ColorBlendAttrib::M_multiply:
|
||||||
enable_blend(true);
|
enable_blend(true);
|
||||||
enable_alpha_test(false);
|
|
||||||
call_dxBlendFunc(D3DBLEND_DESTCOLOR, D3DBLEND_ZERO);
|
call_dxBlendFunc(D3DBLEND_DESTCOLOR, D3DBLEND_ZERO);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ColorBlendAttrib::M_add:
|
case ColorBlendAttrib::M_add:
|
||||||
enable_blend(true);
|
enable_blend(true);
|
||||||
enable_alpha_test(false);
|
|
||||||
call_dxBlendFunc(D3DBLEND_ONE, D3DBLEND_ONE);
|
call_dxBlendFunc(D3DBLEND_ONE, D3DBLEND_ONE);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ColorBlendAttrib::M_multiply_add:
|
case ColorBlendAttrib::M_multiply_add:
|
||||||
enable_blend(true);
|
enable_blend(true);
|
||||||
enable_alpha_test(false);
|
|
||||||
call_dxBlendFunc(D3DBLEND_DESTCOLOR, D3DBLEND_ONE);
|
call_dxBlendFunc(D3DBLEND_DESTCOLOR, D3DBLEND_ONE);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -4931,23 +4927,18 @@ set_blend_mode(ColorWriteAttrib::Mode color_write_mode,
|
|||||||
// No color blend; is there a transparency set?
|
// No color blend; is there a transparency set?
|
||||||
switch (transparency_mode) {
|
switch (transparency_mode) {
|
||||||
case TransparencyAttrib::M_none:
|
case TransparencyAttrib::M_none:
|
||||||
|
case TransparencyAttrib::M_binary:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TransparencyAttrib::M_alpha:
|
case TransparencyAttrib::M_alpha:
|
||||||
case TransparencyAttrib::M_alpha_sorted:
|
case TransparencyAttrib::M_alpha_sorted:
|
||||||
case TransparencyAttrib::M_multisample:
|
case TransparencyAttrib::M_multisample:
|
||||||
case TransparencyAttrib::M_multisample_mask:
|
case TransparencyAttrib::M_multisample_mask:
|
||||||
|
case TransparencyAttrib::M_dual:
|
||||||
enable_blend(true);
|
enable_blend(true);
|
||||||
enable_alpha_test(false);
|
|
||||||
call_dxBlendFunc(D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA);
|
call_dxBlendFunc(D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case TransparencyAttrib::M_binary:
|
|
||||||
enable_blend(false);
|
|
||||||
enable_alpha_test(true);
|
|
||||||
call_dxAlphaFunc(D3DCMP_EQUAL, 1);
|
|
||||||
return;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
dxgsg_cat.error()
|
dxgsg_cat.error()
|
||||||
<< "invalid transparency mode " << (int)transparency_mode << endl;
|
<< "invalid transparency mode " << (int)transparency_mode << endl;
|
||||||
@ -4956,7 +4947,6 @@ set_blend_mode(ColorWriteAttrib::Mode color_write_mode,
|
|||||||
|
|
||||||
// Nothing's set, so disable blending.
|
// Nothing's set, so disable blending.
|
||||||
enable_blend(false);
|
enable_blend(false);
|
||||||
enable_alpha_test(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -4392,7 +4392,6 @@ set_blend_mode(ColorWriteAttrib::Mode color_write_mode,
|
|||||||
nassertv(color_write_mode == _color_write_mode);
|
nassertv(color_write_mode == _color_write_mode);
|
||||||
#if 0
|
#if 0
|
||||||
if(color_write_mode == ColorWriteAttrib::M_off) {
|
if(color_write_mode == ColorWriteAttrib::M_off) {
|
||||||
enable_alpha_test(false);
|
|
||||||
set_color_writemask(0x0);
|
set_color_writemask(0x0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -4405,19 +4404,16 @@ set_blend_mode(ColorWriteAttrib::Mode color_write_mode,
|
|||||||
|
|
||||||
case ColorBlendAttrib::M_multiply:
|
case ColorBlendAttrib::M_multiply:
|
||||||
enable_blend(true);
|
enable_blend(true);
|
||||||
enable_alpha_test(false);
|
|
||||||
call_dxBlendFunc(D3DBLEND_DESTCOLOR, D3DBLEND_ZERO);
|
call_dxBlendFunc(D3DBLEND_DESTCOLOR, D3DBLEND_ZERO);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ColorBlendAttrib::M_add:
|
case ColorBlendAttrib::M_add:
|
||||||
enable_blend(true);
|
enable_blend(true);
|
||||||
enable_alpha_test(false);
|
|
||||||
call_dxBlendFunc(D3DBLEND_ONE, D3DBLEND_ONE);
|
call_dxBlendFunc(D3DBLEND_ONE, D3DBLEND_ONE);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case ColorBlendAttrib::M_multiply_add:
|
case ColorBlendAttrib::M_multiply_add:
|
||||||
enable_blend(true);
|
enable_blend(true);
|
||||||
enable_alpha_test(false);
|
|
||||||
call_dxBlendFunc(D3DBLEND_DESTCOLOR, D3DBLEND_ONE);
|
call_dxBlendFunc(D3DBLEND_DESTCOLOR, D3DBLEND_ONE);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -4430,23 +4426,18 @@ set_blend_mode(ColorWriteAttrib::Mode color_write_mode,
|
|||||||
// No color blend; is there a transparency set?
|
// No color blend; is there a transparency set?
|
||||||
switch (transparency_mode) {
|
switch (transparency_mode) {
|
||||||
case TransparencyAttrib::M_none:
|
case TransparencyAttrib::M_none:
|
||||||
|
case TransparencyAttrib::M_binary:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TransparencyAttrib::M_alpha:
|
case TransparencyAttrib::M_alpha:
|
||||||
case TransparencyAttrib::M_alpha_sorted:
|
case TransparencyAttrib::M_alpha_sorted:
|
||||||
case TransparencyAttrib::M_multisample:
|
case TransparencyAttrib::M_multisample:
|
||||||
case TransparencyAttrib::M_multisample_mask:
|
case TransparencyAttrib::M_multisample_mask:
|
||||||
|
case TransparencyAttrib::M_dual:
|
||||||
enable_blend(true);
|
enable_blend(true);
|
||||||
enable_alpha_test(false);
|
|
||||||
call_dxBlendFunc(D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA);
|
call_dxBlendFunc(D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case TransparencyAttrib::M_binary:
|
|
||||||
enable_blend(false);
|
|
||||||
enable_alpha_test(true);
|
|
||||||
call_dxAlphaFunc(D3DCMP_EQUAL, 1.0f);
|
|
||||||
return;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
dxgsg_cat.error()
|
dxgsg_cat.error()
|
||||||
<< "invalid transparency mode " << (int)transparency_mode << endl;
|
<< "invalid transparency mode " << (int)transparency_mode << endl;
|
||||||
@ -4455,7 +4446,6 @@ set_blend_mode(ColorWriteAttrib::Mode color_write_mode,
|
|||||||
|
|
||||||
// Nothing's set, so disable blending.
|
// Nothing's set, so disable blending.
|
||||||
enable_blend(false);
|
enable_blend(false);
|
||||||
enable_alpha_test(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user