irrlicht's current way of doing blending and transparency really sucks in my opinion, it's so over-complicated.
in my 2d engine i implemented blending and transparency like this:
the complicated but more flexible way:
Code: Select all
sprite->getMaterial()->Source = render::BM_WHITE;
sprite->getMaterial()->Destination = render::BM_WHITE_MINUS_SOURCE_COLOR;
Code: Select all
sprite->getMaterial()->BlendPreset = render::BP_ADD;
Code: Select all
sprite->getMaterial()->Color.a = 0.123;
is there any chance irrlicht could be changed in a similar way? because for each material type you otherwise have to add a large ammount of code, and irrlicht also just provides add, why not divide, substract, multiply, .....
now to the alpha value changing problem:
if a texture has an alpha channel, it should be automatically use it. and if you then change the alpha value of the node/material itself, the node should have changed transparency, too.
im bad at explaining, but i hope you get my point.
see you!
