Native RenderGylph should handle alpha properly
This commit is contained in:
@@ -988,6 +988,7 @@ namespace lime {
|
||||
unsigned char r = bitmap.buffer[i * pitch + j * 3 + 0];
|
||||
unsigned char g = bitmap.buffer[i * pitch + j * 3 + 1];
|
||||
unsigned char b = bitmap.buffer[i * pitch + j * 3 + 2];
|
||||
unsigned char a = (r + g + b) / 3;
|
||||
|
||||
//Red
|
||||
position[(i * width + j) * 4 + 0] = r;
|
||||
@@ -995,8 +996,8 @@ namespace lime {
|
||||
position[(i * width + j) * 4 + 1] = g;
|
||||
//Blue
|
||||
position[(i * width + j) * 4 + 2] = b;
|
||||
//Alpha (fully opaque)
|
||||
position[(i * width + j) * 4 + 3] = 255;
|
||||
//Alpha
|
||||
position[(i * width + j) * 4 + 3] = a;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user