Groovounet
02-21-2011, 09:22 AM
Hi,
On the following scenario, the compiler return the error:
Cannot convert from 'const float' to 'out highp 4-component vector of float' which isn't at all what's happening.
layout(location = FRAG_COLOR, index = 0) out vec4 FragColor;
vec4 test(in sampler2D Sampler, in vec2 Texcoord, in int Lod);
float Lod = textureQueryLod(Diffuse, Vert.Texcoord).x;
FragColor = test(Diffuse, Vert.Texcoord, Lod);
The following code fix this error:
layout(location = FRAG_COLOR, index = 0) out vec4 FragColor;
vec4 test(in sampler2D Sampler, in vec2 Texcoord, in int Lod);
int Lod = int(textureQueryLod(Diffuse, Vert.Texcoord).x);
FragColor = test(Diffuse, Vert.Texcoord, Lod);
On the following scenario, the compiler return the error:
Cannot convert from 'const float' to 'out highp 4-component vector of float' which isn't at all what's happening.
layout(location = FRAG_COLOR, index = 0) out vec4 FragColor;
vec4 test(in sampler2D Sampler, in vec2 Texcoord, in int Lod);
float Lod = textureQueryLod(Diffuse, Vert.Texcoord).x;
FragColor = test(Diffuse, Vert.Texcoord, Lod);
The following code fix this error:
layout(location = FRAG_COLOR, index = 0) out vec4 FragColor;
vec4 test(in sampler2D Sampler, in vec2 Texcoord, in int Lod);
int Lod = int(textureQueryLod(Diffuse, Vert.Texcoord).x);
FragColor = test(Diffuse, Vert.Texcoord, Lod);