Search Unity

Point Sprites example

Discussion in 'Shaders' started by mvogt1, Jun 1, 2014.

  1. mvogt1

    mvogt1

    Joined:
    Jun 1, 2014
    Posts:
    2
    Hello,

    I had the problem, to find a solution for "point sprites", which directly works
    "out of the box", as a .unitypackage.
    So I tried to write my own :)

    Attached is a demo shader as a .unitypackage, which took me some time,
    and experiments (read: $Stackoverflow), but now it should work. (I think).
    It's attached to this post, maybe that someone might find it useful.


    regards,

    Martin

    PS: Movement is QWEASD.
     

    Attached Files:

  2. God-at-play

    God-at-play

    Joined:
    Nov 3, 2006
    Posts:
    330
    Hey this is really cool and exciting, thanks for posting :)

    The material/shader seems to be missing. I think that's the most important part, hehe

    EDIT: I think it might be a problem with my video card? Something about subshaders not being supported
     
    Last edited: Jul 11, 2014
  3. mvogt1

    mvogt1

    Joined:
    Jun 1, 2014
    Posts:
    2
    Hello,

    I have tested the shader on an old Intel GMA5700mhd and a current nvidia card. If unity is started in dx10 mode the point sprites are not drawn and only pink pixel appear at the point coordinates. The shader uses a geometry shader as an intermediate step which works in dx11 and OpenGL mode and should work in dx10 too, because dx10 supports geometry shaders, but seems not to work if unity runs in dx10 mode.

    regards,

    Martin