Darkyenus / glsl4idea

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

Error when attempting to assign result of texture() call to uint when sampler is a usampler2D #177

Closed yonibr closed 1 year ago

yonibr commented 1 year ago

With the uniform defined like this: uniform usampler2D material_id_sampler;

The following code uint material_id = texture(material_id_sampler, v_TexCoords).r; produces the error "Can't assign 'float' to 'uint'" even though hovering over the line of code shows that the parser recognizes material_id_sampler is a usampler2D.

Darkyenus commented 1 year ago

Fixed by https://github.com/Darkyenus/glsl4idea/commit/4e61e28cccf5412e5372216058adbd1a19a09ccd