Add A Custom VertexElement #1874
-
Hi All, a newcomer to Stride from Unity and I'm looking to port some of my C# modules to Stride. One of these is a terrain system that uses custom VertexAttributes to store data such as slope and aspect in a Vector4. Is it possible to add a custom VertexElement type to the VertexElement struct or is that structure constrained to the requirements of DX11. This is lower level code than I'm used to and I don't want to mess this up. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Hi, a starting point is ths: https://doc.stride3d.net/4.1/en/manual/graphics/low-level-api/draw-vertices.html This article describes creating a vertex buffer, a vertex declaration and finally drawing the vertex buffer. |
Beta Was this translation helpful? Give feedback.
-
if you want to define an ext texturecoord, write a custom shader |
Beta Was this translation helpful? Give feedback.
-
Many `using System; namespace Bodyclock.Stride.Terrain
}` |
Beta Was this translation helpful? Give feedback.
-
using the TerrainVertex.Layout when creating a vetexbuffer, and it' will be done. link: https://doc.stride3d.net/4.1/en/manual/graphics/low-level-api/draw-vertices.html. Also, you can check the UnitTest of stride's source. It hsa some samples of drawing |
Beta Was this translation helpful? Give feedback.
-
This would be a nice thing to have in the docs. |
Beta Was this translation helpful? Give feedback.
if you want to define an ext texturecoord, write a custom shader