
5. Tiled Deferred Blending 307
attribute vec2
Position ,
TextureCoordinates [ LAYER_COUNT ];
varying mediump vec2
vTextureCoordinates [ LAYER_COUNT ];
void main ()
{
gl_Position = vec4 ( Position . xy , 0.0 , 1.0 ) ;
for ( int i =0; i < LAYER_COUNT ; i++ )
{
vTextureCoordinates [ i ]=TextureCoordinates [ i ];
}
}
Listing 5.3. Single draw call vertex shader.
superfluous layers into account; this solution requires packing an extra attribute
containing the number of layers aggregated by the current primitive.
We did not need to implement this, but it should be possible to address the
texture limitation mentioned before (one texture or same textures in same order ...