How to make particles react to scene lighting
I'm trying to make a fog particle effect that lights up when I use a flashlight on it but is otherwise dark. I tried using the VertexLit Blended, bit it seems like if I try to render the particles as billboards while using this shader they only react to light from one side (i.e. they respond to a light when I'm on one side and remain dark if I try to shine a light on the opposite side). I'm really not sure what to do at this point, and I don't have any experience writing my own shaders.
Answer by SaltyMeatBoy · Sep 10, 2015 at 12:03 AM
Well, after a little exploring, I found a fix to the problem myself. Basically, instead of using a "particle system," use a "particle emitter." This makes it so that the particles accept light from any angle. To anyone out there who was struggling with this like me, you're welcome.
Answer by Dismantler69 · Oct 20, 2015 at 07:27 AM
Thanks a lot, @SaltyMeatBoy! I was trying to make clouds, but they looked white even at night, so I turned to the community and found an answer immediately. Thanks again!
Answer by uchihaballs · Dec 27, 2017 at 03:18 PM
I know this is old, but what do you mean use "particle emitter" instead of "particle system"? Is that something that got removed? I really need the particles to receive light from any angle. Making a top down game with a flash light(spot light) that is supposed to light up particles, but since the camera is from above the and the light is 90 degrees away all particles are completely dark, which sucks.
Tried to edit the code of the new particle surface shader but can't. Adding that shader (so i can edit it) to the project causes unity to freeze. I have also tried copying the code into another shader and a bunch of stuff, but unity just freezes and the "unity shader compiler" and "chromium host" starts to use up all my CPU power until i forcebly quit Unity.
Anyone got any ideas?