Search Unity

Rewrite gl_pointsize for directx11

Discussion in 'Shaders' started by kinectalicous, Sep 26, 2016.

  1. kinectalicous

    kinectalicous

    Joined:
    Jul 8, 2015
    Posts:
    2
    Hi everyone,

    am rendering point clouds / particle systems successfully with PSIZE in opengl or direct3d... But switching player settings to directx11 on win10 (for HTC Vive game) the point size can no longer be changed. I have found a number of theories in google searches, but no code. How can I rewrite:

    struct VertexOutput {

    float4 pos : SV_POSITION;
    float4 col : COLOR;
    float pointSize : PSIZE;
    };


    VertexOutput vert(VertexInput v) {

    VertexOutput o;
    o.pos = mul(UNITY_MATRIX_MVP, v.v);
    o.col = v.color;
    o.pointSize = _PointSize;

    return o;
    }

    in the shader code to draw/emit quads instead of points?

    thank you for any help - please with code examples, since shaders are pretty tough to debug...