-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line rendering example #1794
Comments
I assume, you're not asking for vk::PolygonMode::eLine? |
I am trying to render a line(/vector) in 3D space. Not a wireframe, i.e. not lines of triangles, but of two points. In my case, I just want to debug rays in a ray tracer and visualizing a few may be a great help. It's obviously not as trivial as just connecting the start and end of every ray, but to get anything going at all, I need to render a line between to points in 3D space and have a depth test enabled. An example of the effect would be the "draw debug line" that Unreal Engine offers: |
Would |
I actually have my input assembly set up with that primitive topology, but I'm not yet at a point of rendering. If that is sufficient to render lines, what is the special line rasterizer If your suggestion is sufficient, that's basically the example I had been asking for, I guess. Hard to say, as I am just getting into this topic - but I couldn't see any example code (even outside of this repository) about simple line rendering. |
That is, for simple line drawings, you don't need that. Only if you want to use more sophisticated line stippling and such, you need to go that route. |
Assuming, this question is answered... |
Sorry for the delay. Finally got round to work on it and get the first results. The suggested solution works, and I do get a line on screen. I still think, it'd be neat to have an example (e.g. draw a histogram or something like that). |
Maybe you could file an issue requesting for such a sample on https://github.com/KhronosGroup/Vulkan-Samples. |
Is there an example for line rendering somewhere? I couldn't find any sample code so far, but rendering lines would be helpful in contexts like ray tracer debugging or graph creation.
I have found the documentation regarding some of the necessary objects, but it is not clear to me yet, how to set this up. E.g. the rasterization for lines needs to be set up as
pNext
pointer of a pipeline rasterization, but does that require the pipeline rasterization to be set up in a specific way?The text was updated successfully, but these errors were encountered: