2D Toolkit Forum

2D Toolkit => Support => Topic started by: Afro-Ninja on September 02, 2013, 04:14:52 am

Title: Will sunshafts work with 2dtk?
Post by: Afro-Ninja on September 02, 2013, 04:14:52 am
I don't have unity pro but one of the reasons I would like to get it is for the image effects, especially sunshafts:

http://docs.unity3d.com/Documentation/Components/script-SunShafts.html

will these shafts show correctly through a bitmap image? like if I have a bitmap of trees and the top section is transparent, would the light beams show through correctly?

Title: Re: Will sunshafts work with 2dtk?
Post by: gary-unikronsoftware on September 02, 2013, 12:14:20 pm
Hi,

We've just had a play around with this here in the office.  Whilst it worked okay on 3d objects it didn't really work at all on 2d sprites, so I wouldn't recommend shelling out for a pro license just to use sun shafts with 2d toolkit.
Title: Re: Will sunshafts work with 2dtk?
Post by: Afro-Ninja on September 02, 2013, 06:25:25 pm
ok, gotcha.

do you think it would be possible to create some basic 3d geometry to act as the edges, and then use a shader to turn the geometry invisible?
I'm not sure if it's possible to get the shafts to show through a transparent object correctly.

thanks!
Title: Re: Will sunshafts work with 2dtk?
Post by: unikronsoftware on September 02, 2013, 06:59:17 pm
Possibly. It works fine with solid 3D geometry, just not very well at all when not using the depth bffer.
Title: Re: Will sunshafts work with 2dtk?
Post by: profanicus on September 03, 2013, 12:17:09 am
What about with sprites that write to the depth buffer, like clip shader?
Title: Re: Will sunshafts work with 2dtk?
Post by: unikronsoftware on September 03, 2013, 09:27:10 am
Its a lot better when it writes to the depth buffer.