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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Yet another night vision shader

Discussion in 'Shaders' started by Wompipomp, Sep 26, 2015.

  1. Wompipomp

    Wompipomp

    Joined:
    Aug 31, 2014
    Posts:
    24
    Hi,

    I am relatively new to shader and I made as my first shader a night vision shader. I know there are many out there but for learning I wanted to do my own. I wanted to be as real as possible and took the following references:
    http://cdn.lightgalleries.net/4ebd8bde12cf2/images/Iraq_Perspective_BookEdit_0049-2.jpg
    https://upload.wikimedia.org/wikipedia/commons/5/52/Nightvision.jpg

    Here are some pics:
    NightVision1.PNG NightVision2.PNG NightVision3.PNG

    Features:
    - Ramp texture for colorisation
    - Noise
    - Lens distortion (for zoom effect or similar - third image)
    - Blur
    - Vignette
    - Downsampling

    Tested in Unity Editor with DX11, DX 9 and OpenGL

    The sources with a sample project (first image) are here: https://bitbucket.org/Wompipomp/night-vision-shader
    Asset package: https://drive.google.com/uc?export=download&id=0B2g4w3wcuDg_aVBmWEVsRUdEdTg

    As I said I am new to shader so any feedback, optimisation tips etc. are very welcome :)

    Thank you very much
    Best regards
    Mark
     
    Last edited: Sep 26, 2015
    DxStd_IgnatPribylov and mgear like this.
  2. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    637
    Looks great!
     
  3. Wompipomp

    Wompipomp

    Joined:
    Aug 31, 2014
    Posts:
    24
    Thank you :)