summaryrefslogtreecommitdiffstats
path: root/modules/betsy/UavCrossPlatform_piece_all.glsl
diff options
context:
space:
mode:
authorBlueCube3310 <53150244+BlueCube3310@users.noreply.github.com>2024-01-04 16:33:20 +0100
committerBlueCube3310 <53150244+BlueCube3310@users.noreply.github.com>2024-08-18 11:14:05 +0200
commit394ea653aacd131c234596299ebf79a52580c9b9 (patch)
tree426057fd548c0ef3fb21dbfe2517b85c3186aacd /modules/betsy/UavCrossPlatform_piece_all.glsl
parent96be44c0ec4bafcb08d78be1a584b751b424db9f (diff)
downloadredot-engine-394ea653aacd131c234596299ebf79a52580c9b9.tar.gz
Add Betsy to speed up BC6 compression
Diffstat (limited to 'modules/betsy/UavCrossPlatform_piece_all.glsl')
-rw-r--r--modules/betsy/UavCrossPlatform_piece_all.glsl17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/betsy/UavCrossPlatform_piece_all.glsl b/modules/betsy/UavCrossPlatform_piece_all.glsl
new file mode 100644
index 0000000000..30854df637
--- /dev/null
+++ b/modules/betsy/UavCrossPlatform_piece_all.glsl
@@ -0,0 +1,17 @@
+
+#define OGRE_imageLoad2D(inImage, iuv) imageLoad(inImage, int2(iuv))
+#define OGRE_imageLoad2DArray(inImage, iuvw) imageLoad(inImage, int3(iuvw))
+
+#define OGRE_imageWrite2D1(outImage, iuv, value) imageStore(outImage, int2(iuv), float4(value, 0, 0, 0))
+#define OGRE_imageWrite2D2(outImage, iuv, value) imageStore(outImage, int2(iuv), float4(value, 0, 0))
+#define OGRE_imageWrite2D4(outImage, iuv, value) imageStore(outImage, int2(iuv), value)
+
+#define OGRE_imageLoad3D(inImage, iuv) imageLoad(inImage, int3(iuv))
+
+#define OGRE_imageWrite3D1(outImage, iuv, value) imageStore(outImage, int3(iuv), value)
+#define OGRE_imageWrite3D4(outImage, iuv, value) imageStore(outImage, int3(iuv), value)
+
+#define OGRE_imageWrite2DArray1(outImage, iuvw, value) imageStore(outImage, int3(iuvw), value)
+#define OGRE_imageWrite2DArray4(outImage, iuvw, value) imageStore(outImage, int3(iuvw), value)
+
+//#define sharedOnlyBarrier memoryBarrierShared();barrier();