Search Unity

Volumetric Lights not working on Final Build

Discussion in 'Global Illumination' started by Foestar, Feb 9, 2018.

  1. Foestar

    Foestar

    Joined:
    Aug 12, 2013
    Posts:
    350
    So as my title suggests my volumetric lights are not showing in the final build. When I'm in Unity Editor it shows fine and everything renders perfectly. But when I build and load up my game only 1 single light source works with the volumetric lighting. I'm not sure why only one effect is making it through the build, but it's frustrating. I'm using the post processing stack from the Unity store, and have been unable to find anything online searching to help clarify what this issue is or anyone else having it.

    Here's a couple photos to show the difference. The first is the 1 light that works showing that they should. The second is what it's coming out as and the third is what it should be.


     
    Last edited: Feb 10, 2018
  2. Foestar

    Foestar

    Joined:
    Aug 12, 2013
    Posts:
    350
    Issue was found. It turns out my initial thought was correct that I had removed from here. I thought it was the Volumetric Lighting I had included to go with the Post Processing stack, then later changed my mind thinking it was the Post Processing stack that was causing the issue. When I went back and looked it turned out it was failing to be included in the build not because I had done anything wrong with it, but had not included the shader in the final build.
     
  3. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    Hey can you explain this to me? I have the "Sandbox/VolumetricLight" in the always included shaders, yet i dont get volumetric light when i build the game.
     
  4. indetails

    indetails

    Joined:
    Mar 15, 2018
    Posts:
    2
    Hey, we had some issues with this as well but we've figured it out - we thought we would explain it here anyway because we found this post but didn't really understand the answer. We thought maybe this could make it a little clearer :)

    Basically the solution was to go in the Project Settings - Graphics - Always Inlcuded Shaders: the "Size" number is usually 10. Up it to 12, so it adds two slots (2 "Elements"). Then for the two new Elements, pick "Blit/Add" and "Bilateral Blur". That did the trick for us!

    Hope it'll help!

     
  5. Faiqlaiq

    Faiqlaiq

    Joined:
    Nov 27, 2017
    Posts:
    6
    Thanks indetails, it works like a dream now.

    in
     
  6. PotatoFairy2011

    PotatoFairy2011

    Joined:
    Mar 13, 2024
    Posts:
    1
    help im not sure what to do when in game the volumetric lighting just isnt there
     
  7. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    328
    Posting on an old thread like this, without much detail about your problem, won't get you very far. If you are facing issues with volumetric lighting, either file a bug report, or post some additional information about your setup such that other might help.