imroved circle shaders
This commit is contained in:
@@ -16,6 +16,22 @@ struct st_n {
|
||||
struct uv_n t;
|
||||
};
|
||||
|
||||
struct rgba {
|
||||
unsigned char r;
|
||||
unsigned char g;
|
||||
unsigned char b;
|
||||
unsigned char a;
|
||||
};
|
||||
|
||||
static float *rgba2floats(float *r, struct rgba c)
|
||||
{
|
||||
r[0] = c.r / 255.0;
|
||||
r[1] = c.g / 255.0;
|
||||
r[2] = c.b / 255.0;
|
||||
r[3] = c.a / 255.0;
|
||||
return r;
|
||||
}
|
||||
|
||||
static sg_blend_state blend_trans = {
|
||||
.enabled = true,
|
||||
.src_factor_rgb = SG_BLENDFACTOR_SRC_ALPHA,
|
||||
@@ -24,5 +40,4 @@ static sg_blend_state blend_trans = {
|
||||
.src_factor_alpha = SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user