public struct SurfaceVertexOne vertex of a lit surface, in the layout the shading stages declare.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Position, normal, tangent, texture coordinate — in that order, and the order is the format. ForwardPlus.rvn's vertex stage takes exactly these four and Locations carries the numbers its reflection reports. A layout that named a location the stage does not declare binds nothing to that attribute and the stage reads whatever the driver left there, which is a mesh drawn with its normals in another slot, on one driver, silently — see VertexLocations.
Interleaved, and one layout rather than a layout per mesh. Every surface goes through one GeometryBuffer so that meshes share a vertex and index buffer and a run of draws can become one command; a buffer has a single stride, so the stride is a decision made once here rather than per asset. MeshData is stored the other way round — parallel typed arrays — because a compiler decides what to keep, and this is where that decision has already been made.
⚠ Forty-eight bytes, uncompressed, and that is not the end state. Half-float texture coordinates and an octahedral normal-tangent pair would make it twenty-four, which is the difference between fitting a level's geometry in a cache and not. Doing that needs the shader side to agree, so it is a change to this struct and to ForwardPlus.rvn together — and it is worth nothing until something is drawing at all.
Fields and properties (7)
public Vector3 PositionWhere it is, in the mesh's own space.
public Vector3 NormalWhich way the surface faces.
public Vector4 TangentThe tangent, with the bitangent's handedness in w.
public Vector2 TexCoordWhere it samples a texture.
public static int SizeInBytesHow many bytes one of these is.
public static VertexLocations LocationsWhere each attribute binds, from ForwardPlus's reflected vertex inputs.
public static VertexSchema SchemaThese four attributes under the names a Raven vertex stage declares them by.
Used by (5)
- MeshExtractionTestsVixen.Rendering.Tests
- SurfaceGeometryVixen.Rendering
- SurfaceGeometryTestsVixen.Rendering.Tests
- VirtualGeometryExtractionTestsVixen.Rendering.Tests
- WorldRendererVixen.Engine.Renderer