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.
⚠ No bone indices and no bone weights, which is why GPU skinning cannot reach this path. MeshData carries both and an import fills them; Pack drops them, because this struct has nowhere to put them. So the buffer a skinned mesh is drawn from has no influences in it, and Schema's four channels are what a stage is matched against by name — which means the Skinned variant of ShadowCaster, whose vertex stage declares bones0 and weights0, makes Layout throw rather than draw. Widening this is one of the five things needs, and the one that costs every mesh in the scene eight more bytes a vertex whether it is skinned or not.
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 (19)
- CascadeCountDeviceTestsVixen.Graphics.Golden.Tests
- CompositorImageTestsVixen.Graphics.Golden.Tests
- MeshExtractionTestsVixen.Rendering.Tests
- MeshParticleVerticesVixen.Rendering
- MorphIndexTestsVixen.Rendering.Tests
- MorphKernelVixen.Rendering
- MorphRenderFeatureVixen.Rendering
- MorphRenderFeatureTestsVixen.Rendering.Tests
- MorphScatterDeviceTestsVixen.Graphics.Golden.Tests
- MorphTargetTestsVixen.Rendering.Tests
- MorphedClusterTestsVixen.Rendering.Tests
- ParticleMeshDeviceTestsVixen.Graphics.Golden.Tests
- SurfaceGeometryVixen.Rendering
- SurfaceGeometryTestsVixen.Rendering.Tests
- TierSceneVixen.Graphics.Golden.Tests
- VfxExtractionTestsVixen.Rendering.Tests
- VirtualGeometryCasterTestsVixen.Rendering.Tests
- VirtualGeometryExtractionTestsVixen.Rendering.Tests
- WorldRendererVixen.Engine.Renderer