# Hardware limitation reached, can only emit 78 vert

**URL:** <https://community.khronos.org/t/hardware-limitation-reached-can-only-emit-78-vert/60751>\
**Category:** OpenGL\
**Tags:** glsl\
**Created:** [April 22, 2010, 11:31am UTC](https://community.khronos.org/t/hardware-limitation-reached-can-only-emit-78-vert/60751 "2010-04-22T11:31:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stef\_y](https://community.khronos.org/letter_avatar_proxy/v4/letter/s/3ec8ea/32.png) [@stef\_y](https://community.khronos.org/u/stef_y)\
**Post date:** [April 22, 2010, 11:31am UTC](https://community.khronos.org/t/hardware-limitation-reached-can-only-emit-78-vert/60751/1 "2010-04-22T11:31:54Z")

</div>

Hello. In the context of school I wanted to write a simple program that using the geometry shader will generate a 32x32 pixel terrain.  
Unfortunately, when linking the program Shader, I read the following error in my log:

```auto

Loading GL_ARB_fragment_shader ext. SUCCESS
Loading GL_ARB_vertex_shader ext. SUCCESS
Loading GL_ARB_geometry_shader4 ext. SUCCESS
Loading GL_ARB_shader_objects ext. SUCCESS

Creating program object: "program1"
Compiling vertex shader: SUCCESS
Compiling fragment shader: SUCCESS
Compiling geometry shader: SUCCESS
GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT: 1024
Linking program shader: FAILED
printProgramInfoLog: Geometry info
-------------
(0) : error C6033: Hardware limitation reached, can only emit 78 vertices of this size

GL_MAX_TEXTURE_UNITS_ARB: 4
OpenGL version: 3.3.0

```

I’ve lost many hours to find something about it …  
The maximum number of vertices emitted is 1024, so why there is 78?  
I would be very grateful if someone help me to understand it.

this is my geometry sahder:

```auto

#version 150
#extension GL_EXT_geometry_shader4 : enable

uniform sampler2D heightmap;

in vec3 vlight[3];
in vec3 vnormal[3];
in vec3 vpoint[3];
out vec3 light;
out vec3 normal;
out vec3 point;

void main()
{
   int i,u,v;
   vec4 vertex;
   vec2 texture_coord;
   vec4 texture_color;

for(i=0; i<32; i++)
for(u=0; u<32; u++)
{
   texture_coord.x = i;
   texture_coord.y = u;
   texture_color = texture2D(heightmap, texture_coord);
   vertex.x = -1+i*0.1;
   vertex.y = -1+u*0.1;
   vertex.z = -1;
   vertex.w = 1;
   gl_Position = vertex;
   gl_PointSize = 0;

   light = vlight[0];
   normal = vnormal[0];
   point = vpoint[0];
   EmitVertex();

   texture_coord.x = i+1;
   texture_coord.y = u;
   texture_color = texture2D(heightmap, texture_coord);
   vertex.x = -1+(i+1)*0.1;
   vertex.y = -1+u*0.1;
   vertex.z = 0;
   vertex.w = 1;
   gl_Position = vertex;
   //gl_PointSize = 0;
   light = vlight[1];
   normal = vnormal[1];
   point = vpoint[1];
   EmitVertex();

   texture_coord.x = i;
   texture_coord.y = u+1;
   texture_color = texture2D(heightmap, texture_coord);
   vertex.x = -1+i*0.1;
   vertex.y = -1+(u+1)*0.1;
   vertex.z = 0;
   vertex.w = 1;
   gl_Position = vertex;
   //gl_PointSize = 0;
   light = vlight[2];
   normal = vnormal[2];
   point = vpoint[2];
   EmitVertex();
   EndPrimitive();
   
}

}

```

When in loop i change from:  
“i\<32” and “u\<32”  
to:  
“i\<4” and “u\<4”  
there are 4_4_3 = 48 vertives and all is OK.

Screen of my 16 triangles:

my graphics card: Gainward GeForce 8400GS 512MB

---

<div class="post-metadata">

**Author:** ![Ilian\_Dinev](https://community.khronos.org/user_avatar/community.khronos.org/ilian_dinev/32/109_2.png) [@Ilian\_Dinev](https://community.khronos.org/u/Ilian_Dinev)\
**Post date:** [April 22, 2010, 12:08pm UTC](https://community.khronos.org/t/hardware-limitation-reached-can-only-emit-78-vert/60751/2 "2010-04-22T12:08:38Z")

</div>

Looky here:

```auto

out vec3 light;
out vec3 normal;
out vec3 point;
out vec4 gl_Position; // exists already

```

This takes 13 float slots.  
13 \* 78 = 1014.

It may be an error that 1024 “vertices” are reported as the limit, while it’s 1024 floats. Or maybe with certain data-formats for gl\_Position the vtxcount of 1024 could actually be reached.

---

<div class="post-metadata">

**Author:** ![stef\_y](https://community.khronos.org/letter_avatar_proxy/v4/letter/s/3ec8ea/32.png) [@stef\_y](https://community.khronos.org/u/stef_y)\
**Post date:** [April 22, 2010, 12:31pm UTC](https://community.khronos.org/t/hardware-limitation-reached-can-only-emit-78-vert/60751/3 "2010-04-22T12:31:58Z")

</div>

I can continue to generate only 204 vertices.

Is there any way to increase the number of vertices?

---

<div class="post-metadata">

**Author:** ![Fugitive](https://community.khronos.org/letter_avatar_proxy/v4/letter/f/ebca7d/32.png) [@Fugitive](https://community.khronos.org/u/Fugitive)\
**Post date:** [April 23, 2010, 5:20am UTC](https://community.khronos.org/t/hardware-limitation-reached-can-only-emit-78-vert/60751/4 "2010-04-23T05:20:56Z")

</div>

Reduce the amount of data stored per-vertex.

---

<div class="post-metadata">

**Author:** ![system](https://community.khronos.org/uploads/default/original/2X/b/ba89cb49313a0e869198c8be354afde8bcae027e.png) [@system](https://community.khronos.org/u/system)\
**Post date:** [October 19, 2021, 7:28pm UTC](https://community.khronos.org/t/hardware-limitation-reached-can-only-emit-78-vert/60751/5 "2021-10-19T19:28:29Z")

</div>

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.
