Search Unity

Simple Yes/No question : Can I do shaders specific to a camera or a character?

Discussion in 'Shaders' started by eniotna308, Sep 10, 2014.

  1. eniotna308

    eniotna308

    Joined:
    Mar 6, 2014
    Posts:
    3
    Hi folks!

    I want to make a 2D, view from top, shooter. (Like Geometry Wars, I made a game with zombies in it, etc...) I also want my game to have structures and walls that limitate the characters vision. I want to have splitscreen gameplay and I don't want the players to see what the other players see.

    My simple question is : Can I do shaders specific to a camera or a character?

    If I can, I'll start learning about shaders (any tutorials or help would be appreciated).
    If I can't, I'll look for something with the GUI. Any other suggestion would be appreciated too.
     
  2. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    If by shaders you mean full-screen effects, then those are per-camera.

    I'm not sure what you mean by split screen with player not seeing what other players can see, though.
     
  3. eniotna308

    eniotna308

    Joined:
    Mar 6, 2014
    Posts:
    3
    Ok. Suppose I have a camera and two different rooms are in it's range. There is a character A in the room A and a character B in the room B. On the character A's screen, I'll only see the room A and the room B will be dark. It will be the opposite in the character B's screen.

    I don't know if there is a tool in Unity to do it. I'm willing to learn what I need but I just don't know where to look. The shaders were just my best bet.
     
  4. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Not sure what you mean by "Dark".

    why not just maintain two worlds?

    one a clone of the other just lit differently. place Instances of the players in both and point the cameras at the same place in the diffrent worlds.

    Totally inefficient solution but maybe opens up some mind-bending possibilities for "Different dimension" play...

    :D
     
  5. eniotna308

    eniotna308

    Joined:
    Mar 6, 2014
    Posts:
    3
    This is actually a very nice idea but it's not what I'm looking for. :p

    Monaco is probably the best example I could find of what I want to do.


    There is 3 players on the map but you only see the light around your charracter. Also, you can't see ennemies in the dark.
    In my game I want the dark part to be totally black so you won't even see the walls and the allies but the basic idea is there.
     
  6. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Last edited: Sep 11, 2014