Numpy warning: Explicitly use 'unsafe' casting when scaling uint8 colors.

This commit is contained in:
David Vierra 2015-09-14 13:07:50 -10:00
parent fc4f89d2d7
commit 0d5a50e691

View File

@ -124,8 +124,8 @@ class LowDetailBlockMesh(ChunkMeshBase):
va1.vertex[:, 0, 1] = depths # stretch to floor
va1.vertex[:, (2, 3), 1] -= 0.5 # drop down to prevent intersection pixels
flatcolors *= 0.8
numpy.multiply(flatcolors, 0.8, out=flatcolors, casting='unsafe')
#flatcolors *= 0.8
va1.rgb[:] = flatcolors
grassmask = topBlocks == 2