pingjiang / glsl4idea

Automatically exported from code.google.com/p/glsl4idea
0 stars 0 forks source link

The plugin doesnt recognize precision qualifiers on varryings or attributes #36

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
attribute vec4 position;
attribute vec3 normal;

varying lowp vec4 colorVarying;

Using the code

uniform mat4 modelViewProjectionMatrix;
uniform mat3 normalMatrix;

void main()
{
    vec3 eyeNormal = normalize(normalMatrix * normal);
    vec3 lightPosition = vec3(0.0, 0.0, 1.0);
    vec4 diffuseColor = vec4(0.4, 0.4, 1.0, 1.0);

    float nDotVP = max(0.0, dot(eyeNormal, normalize(lightPosition)));

    colorVarying = diffuseColor * nDotVP;

    gl_Position = modelViewProjectionMatrix * position;
}

The plugin fails to parse the lowp on the color varying though that is legal 
for glsl.

Original issue reported on code.google.com by kray...@gmail.com on 21 Jul 2012 at 1:34