]> git.sesse.net Git - narabu/blobdiff - encoder.shader
Fix the upload type of the image.
[narabu] / encoder.shader
index c49a3feab0c3c06b3ec1d248f98f7d6cb982f4a1..54103a093d374cca0fb2fcda37a7add308574268 100644 (file)
@@ -8,7 +8,7 @@ layout(r16ui) uniform restrict writeonly uimage2D ac1_ac6_tex;
 layout(r16ui) uniform restrict writeonly uimage2D ac2_ac5_tex;
 layout(r8i) uniform restrict writeonly iimage2D ac3_tex;
 layout(r8i) uniform restrict writeonly iimage2D ac4_tex;
-layout(r8i) uniform restrict readonly iimage2D image_tex;
+layout(r8ui) uniform restrict readonly uimage2D image_tex;
 
 shared float temp[64];
 
@@ -82,9 +82,9 @@ void dct_1d(inout float y0, inout float y1, inout float y2, inout float y3, inou
        const float p4_6 = p2_6 * a4 + (p2_4 - p2_6) * a5;
 
        // phase 5
-       const float p5_2 = p4_2 + p2_3;
-       const float p5_3 = p4_2 - p2_3;
-       const float p5_5 = p4_5 + p1_7;
+       const float p5_2 = p2_3 + p4_2;
+       const float p5_3 = p2_3 - p4_2;
+       const float p5_5 = p1_7 + p4_5;
        const float p5_7 = p1_7 - p4_5;
        
        // phase 6