Hello,
I'm working in a pipeline that uses render_stencil bitmap and found this strange behavior in translucent models:

The box in the first plane is running this action:
action actTranslucent ()
{
set ( my, TRANSLUCENT | SHADOW );
// set ( my, TRANSLUCENT | SHADOW | CAST );
my.material = mtlObject;
var alphaSpeed = 5;
my.alpha = random(100);
while (1)
{
my.alpha += alphaSpeed * time_step;
if ( ( my.alpha > 100 ) || ( my.alpha < 0 ) )
{
my.alpha = clamp ( my.alpha, 0, 100 );
if ( my.alpha == 100 )
{
reset ( me, TRANSLUCENT );
// reset ( me, CAST );
// set ( me, SHADOW );
}
alphaSpeed = -alphaSpeed;
wait(-1);
set ( me, TRANSLUCENT );
// set ( me, CAST );
// reset ( me, SHADOW );
}
wait(1);
}
}
When a 24 bits textures entity becomes transparent with TRANSLUCENT flag, it does not cast stencil shadows (as expected) but it renders projected shadow shapes from the actual render_stencil bitmap over its mesh. Same happens with 32bits textured entities. Look at the second screen where a recognizable projected shape is visible over the translucent entity mesh and written in the render_stencil bitmap.
The problem is soluted, as expected, setting and resetting the SHADOW flag when the entity becomes opaque or viceversa, but CAST (+SHADOW) flag does not work properly in translucent entities.
Bug or not I feel it very strange and wanted to report it.
Salud!
PD: the box model is a single and closed mesh.