Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Creating a 2d earth light map shader

Discussion in 'Shaders' started by Olly, May 24, 2015.

  1. Olly

    Olly

    Joined:
    Jun 19, 2014
    Posts:
    20
    Hello, I'm pretty new to shaders but I'm trying to create something like this effect: (minus the city lights):

    http://thewindowsclub.thewindowsclu...ent/uploads/2010/07/desktopearth_anim_two.gif

    Anyhow, so far I've managed to get some lights to go across the screen and over a map of earth, but that's about it, no idea how to make them like this shape :-/.

    My code:
    http://pastebin.com/GzB3a6Dq

    Some notes
    I'm using OpenGL as it needs to work on mobile devices and I'm only using a square vertex shader to cover the whole texture.