From fa183671091a2a91a23864e769c41a525d4a7c60 Mon Sep 17 00:00:00 2001 From: Waffle Date: Mon, 12 Aug 2019 15:52:55 -0400 Subject: [PATCH] Updated documentation with unpackData fix Updated example documentation to match the already accepted "Fixed Incorrect Tuple Usage in unpackData" fix. --- docs/python_api/examples/renderdoc/decode_mesh.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/python_api/examples/renderdoc/decode_mesh.rst b/docs/python_api/examples/renderdoc/decode_mesh.rst index 4f13dd6af..0061a0104 100644 --- a/docs/python_api/examples/renderdoc/decode_mesh.rst +++ b/docs/python_api/examples/renderdoc/decode_mesh.rst @@ -116,11 +116,11 @@ For normalised formats - :py:attr:`~renderdoc.CompType.UNorm` and :py:attr:`~ren # If the format needs post-processing such as normalisation, do that now if fmt.compType == rd.CompType.UNorm: divisor = float((1 << fmt.compByteWidth) - 1) - value = tuple(float(value[i]) / divisor for i in value) + value = tuple(float(i) / divisor for i in value) elif fmt.compType == rd.CompType.SNorm: maxNeg = -(1 << (fmt.compByteWidth - 1)) divisor = float(-(maxNeg-1)) - value = tuple((float(value[i]) if (value[i] == maxNeg) else (float(value[i]) / divisor)) for i in value) + value = tuple((float(i) if (i == maxNeg) else (float(i) / divisor)) for i in value) # If the format is BGRA, swap the two components if fmt.BGRAOrder():