Closed ideal-fire closed 7 years ago
I'd like to set an image's alpha so I can make a fadein/fadeout effect. Is there any way to do this? I tried using vita2d_draw_texture_tint. It did change the alpha, but it also changed the image's colors.
Code I tried: vita2d_draw_texture_tint(image, 0, 0, RGBA8(255,255,255,50)); vita2d_draw_texture_tint(image, 300, 100, RGBA8(0,0,0,127)); vita2d_draw_texture_tint(image, 500, 100, RGBA8(0,0,0,255)); Result: http://i.imgur.com/0jFvBp5.jpg
vita2d_draw_texture_tint(image, 0, 0, RGBA8(255,255,255,50)); vita2d_draw_texture_tint(image, 300, 100, RGBA8(0,0,0,127)); vita2d_draw_texture_tint(image, 500, 100, RGBA8(0,0,0,255));
Since the blending is multiplicative, RGBA(255, 255, 255, alpha) where alpha goes from 0 to 255.
I'd like to set an image's alpha so I can make a fadein/fadeout effect. Is there any way to do this? I tried using vita2d_draw_texture_tint. It did change the alpha, but it also changed the image's colors.
Code I tried:
vita2d_draw_texture_tint(image, 0, 0, RGBA8(255,255,255,50)); vita2d_draw_texture_tint(image, 300, 100, RGBA8(0,0,0,127)); vita2d_draw_texture_tint(image, 500, 100, RGBA8(0,0,0,255));
Result: http://i.imgur.com/0jFvBp5.jpg