Forum

DX11 Point/Circle Shader for better performance

Hello guys,

i am a student in media and computer science and i am currently looking for a way to improve the performance of my 2d visual in vvvv. I need a better performance because i am trying to draw a lot of points/circles. By watching the workshop of @vux at NODE17 i was able to calculate the positions of my 2D Points(DX11) on my GPU (through a compute shader). Which boosted the performance of the patch drastically. Thanks for this awesome workshop! :)

But for further improvements i am planning to get the actual drawing of the points also on the GPU…

So is there a nice DX11/ HLSL Shader for drawing points similar to the Point (DX11 2d) node? Or is there even a better way to improve the performance of drawing 2d things?

Hopefully this is enough information as i am pretty new to vvvv :)

You probably want to use a thing called instancing.
For that you feed your points data (position and maybe color) to a buffer and use that in the shader.
I think there’s a helppatche in dx11 that does exactly this.

Thanks for your quick Reply @sebl :)

Do you mean the Constant effect? I tried this one with a Sphere and a Segment as Geometry Inputs but it seems to perform much worse than the Point (DX11 2D) node, when increasing the amount of the points data. Do i feed the effect with the wrong nodes (i was orienting myself on the helppatch oft Constant) or is it even the wrong shader?

The Point (DX11 2D) contains of the Selfalign effect, which works pretty nice… but the big question is: is there a better way for drawing points? (so that i can draw more of them at ones :D )

Most likely you are looking for a sprite dx11 node…

i meant the helppatch of ConstantInstanced (DX11.Effect) if you already have a computesahder doing the calculations, you could for example render the positions into a buffer with Renderer (DX11.Buffer) and use that instead of the dynamic buffers in the helppatch.

Thanks for the replies @sebl @antokhio :)

I will have a look at both solutions after this weekend… played around with the ConstantInstanced Efffect already for some minutes and seems promising. But i think for my Outputbuffer from the computeshader i will have to change some code.