SFML community forums

Help => Graphics => Topic started by: TheGoldenFyre on November 07, 2015, 04:31:04 pm

Title: Creating a partially see-through sprite
Post by: TheGoldenFyre on November 07, 2015, 04:31:04 pm
Hi!
I'm trying to create a sprite where certain areas in the sprite are see-through. Is this possible? I can't find any other forum posts about it...
(Sorry if it's really obvious...  Newbie to SFML  :P)
Please help!
Title: Re: Creating a partially see-through sprite
Post by: zsbzsb on November 07, 2015, 04:57:32 pm
You need to utilize the alpha channel in whatever program you are using to create your textures and save your texture with the png format.
Title: Re: Creating a partially see-through sprite
Post by: Resethel on November 08, 2015, 12:57:45 am
You can also load an image, set a mask from a color then load a texture from this image and apply it to your sprite.
But it's definitely easier to do as zsbzsb said
Title: Re: Creating a partially see-through sprite
Post by: TheGoldenFyre on November 08, 2015, 09:20:24 am
Thanks for the help! I created a mask and that worked out fine.