Darkyenus / glsl4idea

A GLSL language plugin for IntelliJ IDEA
GNU Lesser General Public License v3.0
101 stars 30 forks source link

Unable to correctly trigger highlighted code block in layout uniform variables. #187

Open BlackdBlook opened 9 months ago

BlackdBlook commented 9 months ago

Unable to correctly trigger highlighted code block in layout uniform variables.

Wrong highlighting behavior

image

I got a .vert file like this

#version 460 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aNormal;
layout (location = 2) in vec2 aTexCoords;

out vec3 FragPos;
out vec3 Normal;
out vec2 TexCoords;

uniform mat4 model;

layout (shared) uniform Matrices
{
    mat4 view;
    mat4 projection;
    mat4 lightSpaceMatrix;
};

void main()
{
    FragPos = vec3(model * vec4(aPos, 1.0));
    Normal = mat3(transpose(inverse(model))) * aNormal;
    TexCoords = aTexCoords;

    gl_Position = projection * view * vec4(FragPos, 1.0);
}

When I seleced the variable in Matrices, other reference code cannot be highlighted like the other normal uniform variable

Expected behavior

Selecting variables in the Matrices block in the editor, other reference codes are not highlighted correctly. Expected bright results

Versions

Is this a problem of rider ?

Darkyenus commented 9 months ago

Yeah, that looks like a bug in the plugin. Thanks for the report.