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.

Calculating lines on GPU

Discussion in 'Shaders' started by jonbro5556, Mar 13, 2015.

  1. jonbro5556

    jonbro5556

    Joined:
    Jan 1, 2013
    Posts:
    24
    Hey all! I have been digging around on the net for how get nice AA lines with correct screenspace thickness, and there are a bunch of posts that describe the technique.

    http://prideout.net/blog/?p=61
    http://codeflow.org/entries/2012/aug/05/webgl-rendering-of-solid-trails/

    The first one uses the geometry shader in glsl, so it is a no go for cross platform in unity. The second one uses interesting packing of the VBO, which I don't think unity will allow either, but I think you can get close by overloading some of the other mesh elements with the additional data required.

    Can someone give me some hints on if there is a better way to handle this in unity? (the line renderer isn't gonna cut it, I have upwards of 10k lines on screen, and they are popping on and off all the time).