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 / How to make a sprite lighter? v2

Author
Message
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 23rd Oct 2014 14:59
Please help to make a sprite lighter.
I've tried to use SetSpriteTransparency(SpriteNum,2), but I got a square borders on each sprite. I know if I use the black background on images - I'll get it right, but I already have a lot of them and this will take a lot of time to change.
Is there any other way to do this?
Thanks.
unlikely
12
Years of Service
User Offline
Joined: 5th Mar 2012
Location: Ohio, USA
Posted: 23rd Oct 2014 18:27 Edited at: 23rd Oct 2014 18:53
You could try using a sprite shader to render them in v2...?
LoadSpriteShader()
Native Tech
10
Years of Service
User Offline
Joined: 19th Jul 2013
Location:
Posted: 23rd Oct 2014 21:04
Are you tying to fade the sprite?

Try using SetSpriteColorAlpha(sprite_id, 255) as I was just trying to figure out how to change the opacity of my sprites aswell and then stumbled across this function , which takes the "sprite_id" and makes he sprite transarent to a value between 0-255? with 255 being the higher end value of the opacity , hope this helps

Native Technology
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 23rd Oct 2014 23:02
Native Tech, thanks pal, but it not that simple...
unlikely, thanks. But it's not a full answer.
The full answer is:


And we need just load and attach thats shader:

unlikely
12
Years of Service
User Offline
Joined: 5th Mar 2012
Location: Ohio, USA
Posted: 23rd Oct 2014 23:10 Edited at: 23rd Oct 2014 23:11
That's what I was implying... (You're welcome?)

Anyway, glad you figured it out without being given the exact code and shader.
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 23rd Oct 2014 23:24
Thank you, unlikely!
Native Tech
10
Years of Service
User Offline
Joined: 19th Jul 2013
Location:
Posted: 24th Oct 2014 10:38
oh i c u were talking about texttures and not sprites?

Native Technology
unlikely
12
Years of Service
User Offline
Joined: 5th Mar 2012
Location: Ohio, USA
Posted: 24th Oct 2014 11:11
In modern engines, sprites are typically textured quads.

Login to post a reply

Server time is: 2024-04-20 02:27:24
Your offset time is: 2024-04-20 02:27:24