vs_source =
"attribute vec2 position;\n"
"attribute vec3 textureCoords;\n"
- "varying vec3 texCoords;\n"
+ "varying vec4 texCoords;\n"
"void main()\n"
"{\n"
" texCoords = textureCoords;\n"
"precision highp float;\n"
"#endif\n"
"uniform %s texSampler;\n"
- "varying vec3 texCoords;\n"
+ "varying vec4 texCoords;\n"
"void main()\n"
"{\n"
" gl_FragColor = %s(texSampler, %s);\n"
vs_source = ralloc_asprintf(mem_ctx,
"#version %s\n"
"in vec2 position;\n"
- "in vec3 textureCoords;\n"
- "out vec3 texCoords;\n"
+ "in vec4 textureCoords;\n"
+ "out vec4 texCoords;\n"
"void main()\n"
"{\n"
" texCoords = textureCoords;\n"
"precision highp float;\n"
"#endif\n"
"uniform %s texSampler;\n"
- "in vec3 texCoords;\n"
+ "in vec4 texCoords;\n"
"out vec4 out_color;\n"
"\n"
"void main()\n"
*/
table->sampler_3d.type = "sampler3D";
table->sampler_3d.func = "texture3D";
- table->sampler_3d.texcoords = "texCoords";
+ table->sampler_3d.texcoords = "texCoords.xyz";
return &table->sampler_3d;
case GL_TEXTURE_CUBE_MAP:
table->sampler_cubemap.type = "samplerCube";
table->sampler_cubemap.func = "textureCube";
- table->sampler_cubemap.texcoords = "texCoords";
+ table->sampler_cubemap.texcoords = "texCoords.xyz";
return &table->sampler_cubemap;
case GL_TEXTURE_1D_ARRAY:
table->sampler_1d_array.type = "sampler1DArray";
case GL_TEXTURE_2D_ARRAY:
table->sampler_2d_array.type = "sampler2DArray";
table->sampler_2d_array.func = "texture2DArray";
- table->sampler_2d_array.texcoords = "texCoords";
+ table->sampler_2d_array.texcoords = "texCoords.xyz";
return &table->sampler_2d_array;
default:
_mesa_problem(NULL, "Unexpected texture target 0x%x in"