Refactor DownloadIndexBuffer to return unsigned data

This commit is contained in:
Wojtek Figat
2021-08-13 10:06:29 +02:00
parent f44e5fb2fe
commit af22c7e96f
5 changed files with 15 additions and 15 deletions

View File

@@ -538,9 +538,9 @@ namespace FlaxEditor.Windows.Assets
for (int i = 0; i < meshData.IndexBuffer.Length; i += 3)
{
// Cache triangle indices
int i0 = meshData.IndexBuffer[i + 0];
int i1 = meshData.IndexBuffer[i + 1];
int i2 = meshData.IndexBuffer[i + 2];
uint i0 = meshData.IndexBuffer[i + 0];
uint i1 = meshData.IndexBuffer[i + 1];
uint i2 = meshData.IndexBuffer[i + 2];
// Cache triangle uvs positions and transform positions to output target
Vector2 uv0 = meshData.VertexBuffer[i0].TexCoord * uvScale;
@@ -562,9 +562,9 @@ namespace FlaxEditor.Windows.Assets
for (int i = 0; i < meshData.IndexBuffer.Length; i += 3)
{
// Cache triangle indices
int i0 = meshData.IndexBuffer[i + 0];
int i1 = meshData.IndexBuffer[i + 1];
int i2 = meshData.IndexBuffer[i + 2];
uint i0 = meshData.IndexBuffer[i + 0];
uint i1 = meshData.IndexBuffer[i + 1];
uint i2 = meshData.IndexBuffer[i + 2];
// Cache triangle uvs positions and transform positions to output target
Vector2 uv0 = meshData.VertexBuffer[i0].LightmapUVs * uvScale;