From ea23d8283ff5a0c80bdb2e499bf356dab36c29e4 Mon Sep 17 00:00:00 2001 From: samcake Date: Wed, 25 Jan 2017 16:02:58 -0800 Subject: [PATCH] Introducing the TextureTable in the gpu shader system --- libraries/gpu/src/gpu/TextureTable.slh | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 libraries/gpu/src/gpu/TextureTable.slh diff --git a/libraries/gpu/src/gpu/TextureTable.slh b/libraries/gpu/src/gpu/TextureTable.slh new file mode 100644 index 0000000000..1aa727c99d --- /dev/null +++ b/libraries/gpu/src/gpu/TextureTable.slh @@ -0,0 +1,29 @@ + +<@if not GPU_TEXTURE_TABLE_SLH@> +<@def GPU_TEXTURE_TABLE_SLH@> + +#ifdef GPU_TEXTURE_TABLE_BINDLESS +#define GPU_TEXTURE_TABLE_MAX_NUM_TEXTURES 8 + +struct TextureTable { + uvec4 _textures[GPU_TEXTURE_TABLE_MAX_NUM_TEXTURES]; +}; + +#define TextureTable(index) layout (std140) uniform gpu_textureTableBuffer##index { TextureTable _table##index; }; + +#else + +#endif + + + + +<@endif@>