Ingen beskrivning
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GeometryPoolDefs.cs 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. namespace UnityEngine.Rendering.UnifiedRayTracing
  3. {
  4. internal static class GeometryPoolConstants
  5. {
  6. public static int GeoPoolPosByteSize = 3 * 4;
  7. public static int GeoPoolUV0ByteSize = 4 * 4;
  8. public static int GeoPoolUV1ByteSize = 4 * 4;
  9. public static int GeoPoolNormalByteSize = 1 * 4;
  10. public static int GeoPoolPosByteOffset = 0;
  11. public static int GeoPoolUV0ByteOffset = GeoPoolPosByteOffset + GeoPoolPosByteSize;
  12. public static int GeoPoolUV1ByteOffset = GeoPoolUV0ByteOffset + GeoPoolUV0ByteSize;
  13. public static int GeoPoolNormalByteOffset = GeoPoolUV1ByteOffset + GeoPoolUV1ByteSize;
  14. public static int GeoPoolIndexByteSize = 4;
  15. public static int GeoPoolVertexByteSize = GeoPoolPosByteSize + GeoPoolUV0ByteSize + GeoPoolUV1ByteSize + GeoPoolNormalByteSize;
  16. }
  17. internal struct GeoPoolVertex
  18. {
  19. public Vector3 pos;
  20. public Vector4 uv0;
  21. public Vector4 uv1;
  22. public Vector3 N;
  23. }
  24. internal struct GeoPoolMeshChunk
  25. {
  26. public int indexOffset;
  27. public int indexCount;
  28. public int vertexOffset;
  29. public int vertexCount;
  30. }
  31. [Flags]
  32. internal enum GeoPoolVertexAttribs { Position = 1, Normal = 2, Uv0 = 4, Uv1 = 8 }
  33. }