From b8401c220bbb581e2c1334eba12f58b25eb9103b Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 17 Oct 2017 00:01:07 +0200 Subject: [PATCH] Flip the encoding order so that it is correct. --- rans.shader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rans.shader b/rans.shader index 8e9c422..05ac120 100644 --- a/rans.shader +++ b/rans.shader @@ -125,7 +125,7 @@ void encode_9_7(uint streamgroup_num, uint coeff_row, layout(r16ui) restrict rea uint sign_bias1 = ransdist[enc1.lut_base + 255].x + ransdist[enc1.lut_base + 255].y; uint sign_bias2 = ransdist[enc2.lut_base + 255].x + ransdist[enc2.lut_base + 255].y; - for (uint subblock_idx = BLOCKS_PER_STREAM; subblock_idx --> 0; ) { + for (uint subblock_idx = 0; subblock_idx < BLOCKS_PER_STREAM; ++subblock_idx) { // TODO: Use SSBOs instead of a texture? uint x = (streamgroup_num * BLOCKS_PER_STREAM + subblock_idx) % 160; uint y = (streamgroup_num * BLOCKS_PER_STREAM + subblock_idx) / 160; -- 2.39.2