FIXED: Warnings when using array uniforms

Hi there,

The GLSL TOP shows a warning about a missing uniform when using arrays.
Not the worst problem, but thought I mention it :slight_smile:

See screenshot.

Cheers,
Tim

I think you want to use the arrays tab of the GLSL Multi. I’ve put a chop with 2 samples on the “chop0” parameter. The chop could have 10 samples and then the shader code would be

uniform float test[10];

Correct, this warning is there to let you know you have a uniform declared in the shader, but you aren’t giving it any value.

Yeah indeed. I understand the warning. Perhaps I gave a bit of a weird example because indeed normally you would just use the array parameter page.

I came across this minor ‘issue’ when I was exporting the code of a phong MAT while using the rim lights. It will create uniforms like uRimColor[0], uRimDir[0] etc.

So the uniforms are declared as an array in the shader, and the values are set in the parameters, but the warning is still shown. (because ‘uRimColor’ is not set)

Cheers,
Tim

Ah, good catch. We’ll fix that.

Hi Tim,

This will be fixed in the next Experimental build. Thanks for the report!