{"repo":"andrew-raphael-lukasik/Segments","free":true,"listed":false,"github":"https://github.com/andrew-raphael-lukasik/Segments","clone":"git clone https://github.com/andrew-raphael-lukasik/Segments.git","description":"Line renderer for DOTS tech stack.","language":"C#","stars":48,"topics":["unity","dots","line-renderer"],"license":"MIT","category":"game-templates","readme_excerpt":"Segments Segments is a lightweight line renderer for DOTS tech stack. - You create and then fill the Segment buffer (pairs of points) plotting shapes you want, SegmentUpdateSystem then pushes this data to the GPU where geometry shader creates output triangles on screen. - Segment buffer's lifetime control and plotting, being part of an Entity , can happen either in a system, job, editor window or a monobehaviour - your choice. - Can be used for runtime shapes only or in the editor for debug gizmos as well. - To develop the look of the lines to your specific needs you are expected to know shader programming basics to be able to fork and modify the base shader on your own Getting started: Here is a minimum code that will draw lines on screen: Code above is just an illustration of the workflow to get you started. The best way of doing this is with use of job system as these will result in the best performance. Look into Samples to learn more. Performance Stress tested with 300k segments on my laptop (i7-7700HQ, GTX1060M) and bottleneck turned out to be the GPU (shader). RenderDoc debugger shows that stress test scene generates very high amount of PS invocations (at 1920x876 res). I thought about maybe adding depth-only prepass to reduce this but that would require changes to URP renderer which is something I don't find fitting for this project - I want it to be plug&play, with minimum dependencies. I'm investigating whenever replacing geometry shader with a compute shader will r","default_branch":null,"files":null,"tree":[],"storefront":"/r/andrew-raphael-lukasik","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/andrew-raphael-lukasik/Segments/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}