Introducing the TextureTable in the gpu shader system

This commit is contained in:
samcake 2017-01-25 16:02:58 -08:00 committed by Bradley Austin Davis
parent 933e1f4735
commit ea23d8283f

View file

@ -0,0 +1,29 @@
<!
// gpu/TextureTable.slh
//
// Created by Sam Gateau on 1/25/17.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
!>
<@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@>