Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Cheap, mobile friendly full-screen flash effect

Discussion in 'General Graphics' started by frogwise, Mar 29, 2016.

  1. frogwise

    frogwise

    Joined:
    Nov 27, 2009
    Posts:
    103
    I'm trying to swap some background art textures as gameplay changes, and I would like to cover this up with some kind of screen flash (as if lightning struck) effects that would be cheap on mobile.

    Any suggestions are much appreciated.
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,209
    You just want to flash the screen white, or a super bright flash where everything is either white or partially in shadow?

    The first one is easy, just put a white quad in front of the camera. You can fade it out quickly by animating the material. Usually people use this to fade to black for scene transitions or the like, but it works fine for this too.

    If you want the second you'll need a custom shader that ignores all the textures and just takes the directional shadows or lightmap or however you're shadowing your scene, maybe with the above as well as you'll probably just want this effect on or off without any kind of transition.
     
    Pixierrr likes this.
  3. frogwise

    frogwise

    Joined:
    Nov 27, 2009
    Posts:
    103
    The first solution is fine thanks!