mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
fix transform_color bug
This commit is contained in:
parent
39e068ae58
commit
2f68d6077a
@ -1274,7 +1274,7 @@ transform_color(Colorf &InColor,D3DCOLOR &OutRGBAColor) {
|
|||||||
(InColor[1] * _current_color_scale[1]) + _current_color_offset[1],
|
(InColor[1] * _current_color_scale[1]) + _current_color_offset[1],
|
||||||
(InColor[2] * _current_color_scale[2]) + _current_color_offset[2],
|
(InColor[2] * _current_color_scale[2]) + _current_color_offset[2],
|
||||||
(InColor[3] * _current_color_scale[3]) + _current_color_offset[3]);
|
(InColor[3] * _current_color_scale[3]) + _current_color_offset[3]);
|
||||||
OutRGBAColor = Colorf_to_D3DCOLOR(InColor);
|
OutRGBAColor = Colorf_to_D3DCOLOR(transformed);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1398,7 +1398,7 @@ transform_color(Colorf &InColor,D3DCOLOR &OutRGBAColor) {
|
|||||||
(InColor[1] * _current_color_scale[1]) + _current_color_offset[1],
|
(InColor[1] * _current_color_scale[1]) + _current_color_offset[1],
|
||||||
(InColor[2] * _current_color_scale[2]) + _current_color_offset[2],
|
(InColor[2] * _current_color_scale[2]) + _current_color_offset[2],
|
||||||
(InColor[3] * _current_color_scale[3]) + _current_color_offset[3]);
|
(InColor[3] * _current_color_scale[3]) + _current_color_offset[3]);
|
||||||
OutRGBAColor = Colorf_to_D3DCOLOR(InColor);
|
OutRGBAColor = Colorf_to_D3DCOLOR(transformed);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -1421,9 +1421,10 @@ draw_prim_setup(const Geom *geom) {
|
|||||||
#define GET_NEXT_VERTEX(NEXTVERT) { NEXTVERT = geom->get_next_vertex(vi); }
|
#define GET_NEXT_VERTEX(NEXTVERT) { NEXTVERT = geom->get_next_vertex(vi); }
|
||||||
#define GET_NEXT_NORMAL() { p_normal = geom->get_next_normal(ni); }
|
#define GET_NEXT_NORMAL() { p_normal = geom->get_next_normal(ni); }
|
||||||
#define GET_NEXT_TEXCOORD() { p_texcoord = geom->get_next_texcoord(ti); }
|
#define GET_NEXT_TEXCOORD() { p_texcoord = geom->get_next_texcoord(ti); }
|
||||||
|
|
||||||
#define GET_NEXT_COLOR() { \
|
#define GET_NEXT_COLOR() { \
|
||||||
Colorf tempcolor = geom->get_next_color(ci); \
|
Colorf tempcolor = geom->get_next_color(ci); \
|
||||||
if(_color_transform_enabled == 0) { \
|
if(_color_transform_enabled == 0) { \
|
||||||
_curD3Dcolor = Colorf_to_D3DCOLOR(tempcolor); \
|
_curD3Dcolor = Colorf_to_D3DCOLOR(tempcolor); \
|
||||||
} else { \
|
} else { \
|
||||||
transform_color(tempcolor,_curD3Dcolor); \
|
transform_color(tempcolor,_curD3Dcolor); \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user