Is there a good way to store data per edge in a mesh for read on the GPU, or are you better off just storing that data per triangle, even though it is likely redundantly stored on the triangle that shares the edge?
-
-
Vastauksena käyttäjälle @Atrix256
Vertex fetching with no real index buffer, but instead have a buffer that is the basically wavefront obj style indices. You can end up storing pretty much anything pretty arbitrarily and without duplication.
1 vastaus 0 uudelleentwiittausta 3 tykkäystä -
Vastauksena käyttäjälle @tloch14
Could you spell it out a little bit more, like how youd store and retrieve the data (like, the index where edge data lived, how you'd find it)
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjälle @Atrix256
Drafted this up real fast to prove the point but it probably won't compile. Been in glsl land for awhile but wrote it in as best I remember hlsl, so my syntax may be off.pic.twitter.com/SKr6vkTpid
2 vastausta 0 uudelleentwiittausta 2 tykkäystä -
Bah. Refactoring as I was writing comments and some of those comments are wrong or misleading. Here I've touched it up some.pic.twitter.com/HIX6OjeANq
1 vastaus 0 uudelleentwiittausta 1 tykkäys -
I noticed in the other branches of this thread you mentioned that an edge is where two triangles meet. I don't think that's a good definition of a triangle edge, because a mesh can have holes, BUT you can access adjacent triangles pretty easily this way if you set up the data.pic.twitter.com/qptnygUXx8
1 vastaus 0 uudelleentwiittausta 1 tykkäys
I'd bet there's a lot of arbitrary mesh queries you can do this way that are normally only done in mesh editor programs. In the past, I've used things like this for tetrahedron meshes as well.
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.