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.
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.