Relative Content

Tag Archive for javaopenglgraphicsgame-developmentlwjgl

Only one texel rendering during mass batch rendering using SSBOs

First, this is my second time asking this question. The first time, I was given many different tips that I applied into this new question.
Currently, I am working upon a 2D tile renderer. Switching VAOs i found to be too performance draining. Therefore, I decided upon batching the tiles. I have been able to render each tile in a defined grid size. I decided that I would use a single texture atlas, and in order to set each texture, I would just change their texture coordinates. I decided that I would do this with an SSBO, and that within the shader, I would use gl_InstanceId to find which set of vertices or texture coordinates to use. For now, I have just applied the same texture coordinates to all of them, and later I will change this.