Madrix script - ALPHA constant ignored
Moderator: MADRIX Team
Madrix script - ALPHA constant ignored
The ALPHA constant is ignored in the SetPixel draw function.
Is there a work around for this problem?
Best regards,
Quinten
Code: Select all
@scriptname="";
@author="";
@version="";
@description="";
void InitEffect()
{
}
void RenderEffect()
{
color red = {255,0,0,0,0};
SetPixel(red, 10,10);
color opacity = {0,0,0,0,0};
SetPixel(opacity,10,10,ALPHA);
//expected result -> The pixel stays red
//returned result -> The pixel becomes black
//ALPHA constant is ignored
}
void MatrixSizeChanged()
{
InitEffect();
}
Best regards,
Quinten
Re: Madrix script - ALPHA constant ignored
Hello qniens,
.
Thank you for reporting the issue. At the moment it is not possible to work with the ALPHA parameter in the "Draw" functions.
.
A work around could be to work again with the "SetPixel" function but without the "ALPHA" parameter and set everytime the desired color. Maybe you need to calculate a mix color first.
Or if you only want to dim the pixel you can work with the function "DimPixel(float value, int x, int y)".
.
Thank you for reporting the issue. At the moment it is not possible to work with the ALPHA parameter in the "Draw" functions.
.
A work around could be to work again with the "SetPixel" function but without the "ALPHA" parameter and set everytime the desired color. Maybe you need to calculate a mix color first.
Or if you only want to dim the pixel you can work with the function "DimPixel(float value, int x, int y)".
Re: Madrix script - ALPHA constant ignored
Hello Guertler,
Thank you for your reply.
The work around is workable.
Perhaps you should remove the paragraph about the ALPHA constant in the manual:
http://help.madrix.com/m3/html/script/i ... and_c.html
Best regards,
Quinten
Thank you for your reply.
The work around is workable.
Perhaps you should remove the paragraph about the ALPHA constant in the manual:
http://help.madrix.com/m3/html/script/i ... and_c.html
Best regards,
Quinten