Skip to content

Instantly share code, notes, and snippets.

@mellinoe
Last active February 8, 2017 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mellinoe/dfde7defa7b5ec634cb8d8b0c3f63ea3 to your computer and use it in GitHub Desktop.
Save mellinoe/dfde7defa7b5ec634cb8d8b0c3f63ea3 to your computer and use it in GitHub Desktop.
Material material = rc.ResourceFactory.CreateMaterial(rc,
"vertex", "fragment",
new MaterialVertexInput(VertexPositionColor.SizeInBytes,
new MaterialVertexInputElement(
"Position", VertexSemanticType.Position, VertexElementFormat.Float3),
new MaterialVertexInputElement(
"Color", VertexSemanticType.Color, VertexElementFormat.Float4)),
new MaterialInputs<MaterialGlobalInputElement>(
new MaterialGlobalInputElement(
"ViewProjectionMatrix", MaterialInputType.Matrix4x4, viewProjection)),
MaterialInputs<MaterialPerOjbectInputElement>.Empty,
MaterialTextureInputs.Empty);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment