char terrain_displacement_mapping_geom[] = "#version 120\n"
                                           "\n"
                                           "#pragma requires(COMPUTE_DIAGONALS)\n"
                                           "\n"
                                           "#extension GL_EXT_geometry_shader4 : enable\n"
                                           "\n"
                                           "varying in vec3 normals_in[4];\n"
                                           "varying in vec2 texcoord_in[4];\n"
                                           "varying in vec4 basecolor_in[4];\n"
                                           "\n"
                                           "varying out vec2 texcoord;\n"
                                           "varying out vec4 basecolor;\n"
                                           "\n"
                                           "void main(void)\n"
                                           "{\n"
                                           "    float delta_02 = dot(normals_in[2],normals_in[0]);\n"
                                           "    float delta_13 = dot(normals_in[3],normals_in[1]);\n"
                                           "\n"
                                           "    if (delta_02>delta_13)\n"
                                           "    {\n"
                                           "        gl_Position = gl_PositionIn[3]; texcoord = texcoord_in[3]; basecolor = basecolor_in[3]; EmitVertex();\n"
                                           "        gl_Position = gl_PositionIn[2]; texcoord = texcoord_in[2]; basecolor = basecolor_in[2]; EmitVertex();\n"
                                           "        gl_Position = gl_PositionIn[0]; texcoord = texcoord_in[0]; basecolor = basecolor_in[0]; EmitVertex();\n"
                                           "        gl_Position = gl_PositionIn[1]; texcoord = texcoord_in[1]; basecolor = basecolor_in[1]; EmitVertex();\n"
                                           "        EndPrimitive();\n"
                                           "    }\n"
                                           "    else\n"
                                           "    {\n"
                                           "        gl_Position = gl_PositionIn[0]; texcoord = texcoord_in[0]; basecolor = basecolor_in[0]; EmitVertex();\n"
                                           "        gl_Position = gl_PositionIn[3]; texcoord = texcoord_in[3]; basecolor = basecolor_in[3]; EmitVertex();\n"
                                           "        gl_Position = gl_PositionIn[1]; texcoord = texcoord_in[1]; basecolor = basecolor_in[1]; EmitVertex();\n"
                                           "        gl_Position = gl_PositionIn[2]; texcoord = texcoord_in[2]; basecolor = basecolor_in[2]; EmitVertex();\n"
                                           "        EndPrimitive();\n"
                                           "    }\n"
                                           "}\n"
                                           "\n";
