Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Additive blending don't work???

Author
Message
Diegs
8
Years of Service
User Offline
Joined: 27th Oct 2015
Location:
Posted: 25th Jan 2016 10:00
Hi

Today I tried to use the command: SetSpriteTransparency
but when I use: SetSpriteTransparency(sprite, 2)
the sprite is displayed incorrectly.

I use this sprite:


This is the result on AppGameKit with SetSpriteTransparency(sprite, 2)


But It should be so:


Any solution?
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 25th Jan 2016 12:19
You have to replace your transparent pixel color by the black color.
AGK2 tier1 - http://www.dracaena-studio.com
Diegs
8
Years of Service
User Offline
Joined: 27th Oct 2015
Location:
Posted: 25th Jan 2016 13:47
Oh, thanks man... it work!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Jan 2016 19:18
A well timed piece of advice, thanks!
SetSpriteColorAlpha() isn't working on my additive-blended sprites. Is this correct behaviour?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 28th Jan 2016 22:48
Quote: "SetSpriteColorAlpha() isn't working on my additive-blended sprites. Is this correct behaviour?"

Yes, the alpha channel is not used in additive blending
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 29th Jan 2016 07:42
@Batvink :
To use the coloralpha with an additive sprite, you should use a shader. Baxslash has posted an shader for additive sprite and slpha, in the shader thread

Here is the shader :

additive.ps :


additive.vs :


You use it as a sprite shader with :

AGK2 tier1 - http://www.dracaena-studio.com

Login to post a reply

Server time is: 2024-09-29 09:26:37
Your offset time is: 2024-09-29 09:26:37