Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - CC_fan

Pages: [1]
1
Graphics / Re: Alpha-Blending on top of Alpha Background
« on: December 14, 2013, 05:47:45 pm »
Oh, I see and thanks for the link wintertime! Thats exactly what I searched for!

2
Graphics / Re: Alpha-Blending on top of Alpha Background
« on: December 13, 2013, 06:10:28 pm »
Didn't I said that this happens? But still don't understand why
(0,0,0,0.5) Alpha Blended on (0,0,0,0) results in (0,0,0,1) and not (0,0,0,0.5)
So a smoothed Texture, rendered on an RenderTexture and than on the Window with an different background than black is no longer smooth.

3
Graphics / Re: Alpha-Blending on top of Alpha Background
« on: December 13, 2013, 02:16:56 pm »
Year, I think that the transparent is black with zero alpha is the problem.
The actual Problem is that Alpha blending deletes the alpha chanal form the background:
For Example the Background has an Alpha of 0 and I am drawing an Sprite with an Texture of Alpha 0.5 using Alpha-Blending, I would expect the result to be Alpha 0.5 . Instead the resulting Texture has a Alpha of 1.

4
Graphics / Alpha-Blending on top of Alpha Background
« on: December 12, 2013, 10:48:35 pm »
Hello,
in my Game, i'm prerendering seperate chunks of Tiles, so they don't have to be rendered all in runtime, to get a better FPS. So i'm using an RenderTexture. Works fine for me, but my Textures have semi-transparent pixels on the edges to get them smooth. But when I render the Sprite on top of my Transparent background of the RenderWindow, this pixels get blended on top of a black background, so I get black lines on each Chunk-boader. If I'm using no blending, this black lines are not present, but then I'm overriding the Tiles rendered before, so this also dosn't work.
Where is the problem, or is there an work-arround?

basicly i'm using this code:
sf::RenderTexture rTexture;
rTexture.create(100,100);
rTexture.clear(sf::Transparent);
rTexture.draw(spriteXY);

// and Later
window.draw(rTexture.getTexture);
 
so the rTexture dosn't keep the Alpha of the spriteXY

Pages: [1]