VertexFragmentCompilationInfo.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. namespace Veldrid.SPIRV
  2. {
  3. /// <summary>
  4. /// The output of a cross-compile operation of a vertex and fragment shader from SPIR-V to some target language.
  5. /// </summary>
  6. public class VertexFragmentCompilationResult
  7. {
  8. /// <summary>
  9. /// The translated vertex shader source code.
  10. /// </summary>
  11. public string VertexShader { get; }
  12. /// <summary>
  13. /// The translated fragment shader source code.
  14. /// </summary>
  15. public string FragmentShader { get; }
  16. /// <summary>
  17. /// Information about the resources used in the compiled shaders.
  18. /// </summary>
  19. public SpirvReflection Reflection { get; }
  20. internal VertexFragmentCompilationResult(
  21. string vertexCode,
  22. string fragmentCode)
  23. : this(vertexCode, fragmentCode, null)
  24. {
  25. }
  26. internal VertexFragmentCompilationResult(
  27. string vertexCode,
  28. string fragmentCode,
  29. SpirvReflection reflection)
  30. {
  31. VertexShader = vertexCode;
  32. FragmentShader = fragmentCode;
  33. Reflection = reflection;
  34. }
  35. }
  36. }