Skip to content

Commit

Permalink
Update scene.frag.glsl
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeljetstream authored Feb 18, 2017
1 parent e6c1037 commit 66a02e6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scene.frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ struct Material {
Side _pad[2];
};

// NOTE
// When material data becomes larger, and the ratio of draws/materials is higher
// it is recommended to not use INDEXING for material data, but use a regular
// ubo as usual.
// Likewise SSBO indexing are even less recommended for this purpose, as SSBOs
// are slower to access.

layout(std140,binding=UBO_MATERIAL) uniform materialBuffer {
#if USE_INDEXING
Material materials[256];
Expand Down Expand Up @@ -100,4 +107,4 @@ void main()
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------*/
-----------------------------------------------------------------------*/

0 comments on commit 66a02e6

Please sign in to comment.