1
\$\begingroup\$

Need help in writing shaders in Stride. I have a vertex list. I need to create triangle from each of the vertex. For each vertex, it will be considered as a center point and three new points are calculated around it. Now I need to construct the triangle from those three points. How to do it with vertex or geometry shaders?

\$\endgroup\$
5
  • 1
    \$\begingroup\$ You realize that there is an infinity of triangles you can create around a given point, right? What shape do you want the triangle, how do you want them oriented? What do you intend to do with this? \$\endgroup\$
    – Vaillancourt
    Commented Aug 10, 2021 at 11:21
  • 1
    \$\begingroup\$ I would like to render a point cloud. For that, I need to create a primitive shape for each of the given points. I chose to show a triangle as the primitive shape. Yes, we can create many triangles for a given point. As a first step, I will hardcode the offsets to find the three vertices of the triangle. \$\endgroup\$
    – Developer
    Commented Aug 10, 2021 at 11:48
  • \$\begingroup\$ Still trying to find the answer. Any info on this would be helpful. \$\endgroup\$
    – Developer
    Commented Aug 22, 2021 at 12:56
  • \$\begingroup\$ That's not exactly what you need but I went through something similar in the past, maybe it could be of help, at least as a starting point. \$\endgroup\$
    – Vaillancourt
    Commented Aug 22, 2021 at 13:03
  • \$\begingroup\$ @Vaillancourt Thanks for the help. But this is not what I'm expecting. I need to create a custom shader in Stride3d through which I need to alter the vertices. Whatever I do, the entity is not rendered in the scene. \$\endgroup\$
    – Developer
    Commented Sep 3, 2021 at 10:00

0

You must log in to answer this question.

Browse other questions tagged .