"}\n";
const char DesertPillars::skybox_vertex_src[] =
+ "#version 120\n"
"varying vec3 v_texcoord;\n"
"void main()\n"
"{\n"
" gl_Position = gl_ProjectionMatrix*vec4(mat3(gl_ModelViewMatrix)*gl_Vertex.xyz, 1.0);\n"
- " v_texcoord = gl_Vertex;\n"
+ " v_texcoord = gl_Vertex.xyz;\n"
"}";
const char DesertPillars::skybox_fragment_src[] =
"varying float v_ground_type;\n"
"vec4 sample_texture(vec2 coord)\n"
"{\n"
- " return mix(texture2D(texture1, coord*3), texture2D(texture2, coord), v_ground_type);\n"
+ " return mix(texture2D(texture1, coord*3.0), texture2D(texture2, coord), v_ground_type);\n"
"}\n"
"vec3 sample_normalmap(vec2 coord)\n"
"{\n"
- " return mix(texture2D(normalmap1, coord*3), texture2D(normalmap2, coord), v_ground_type);\n"
+ " return mix(texture2D(normalmap1, coord*3.0).rgb, texture2D(normalmap2, coord).rgb, v_ground_type);\n"
"}\n";
const char DesertPillars::cube_transform_src[] =
"attribute vec3 sphere_coord;\n"
"vec4 transform_vertex(vec4 vertex)\n"
"{\n"
- " return gl_ModelViewMatrix*vec4(mix(vertex, sphere_coord, spherify), 1.0);\n"
+ " return gl_ModelViewMatrix*vec4(mix(vertex.xyz, sphere_coord, spherify), 1.0);\n"
"}\n"
"vec3 transform_normal(vec3 normal)\n"
"{\n"