mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 22:22:54 +02:00
Introducing the TextureTable in the gpu shader system
This commit is contained in:
parent
933e1f4735
commit
ea23d8283f
1 changed files with 29 additions and 0 deletions
29
libraries/gpu/src/gpu/TextureTable.slh
Normal file
29
libraries/gpu/src/gpu/TextureTable.slh
Normal 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@>
|
Loading…
Reference in a new issue