Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Fog and Spot Light
« previous
next »
Print
Pages: [
1
]
Author
Topic: Fog and Spot Light (Read 8449 times)
csotomon
Newbie
Posts: 6
Fog and Spot Light
«
on:
December 05, 2012, 02:26:12 am »
How can I make that my sprite become afected by the unity fog and a spot Light?
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: Fog and Spot Light
«
Reply #1 on:
December 05, 2012, 08:24:36 am »
You can use one of the lit shaders. Also be sure to change this
http://unikronsoftware.com/2dtoolkit/doc/reference/sprite_collection.html
Normal Generation -> Normals only.
Logged
csotomon
Newbie
Posts: 6
Re: Fog and Spot Light
«
Reply #2 on:
December 06, 2012, 03:47:02 am »
Hi, with this changes, the sprite is affected by the spot light, but no for the fog, how can i solve this?
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: Fog and Spot Light
«
Reply #3 on:
December 06, 2012, 09:39:23 am »
You'll have to change the shaders, or copy them and then modify the copy, whichever you prefer. The shaders have fog turned off explicitly to save performance - in a vast majority of cases there isn't much use to fogging sprites.
In the shader, you will find a line like this:
Fog { Mode Off }
You will need to switch it to something more appropriate based on this:
http://docs.unity3d.com/Documentation/Components/SL-Fog.html
Logged
csotomon
Newbie
Posts: 6
Re: Fog and Spot Light
«
Reply #4 on:
December 06, 2012, 04:33:11 pm »
Thank you for U help
Logged
Tochas
2D Toolkit
Newbie
Posts: 15
Re: Fog and Spot Light
«
Reply #5 on:
December 06, 2012, 06:52:08 pm »
Have someone used the "2D Volumetric Lighting system" available on the asset store?
http://reverieinteractive.com/2dvls
I am thinking to give it a try
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Fog and Spot Light