regl icon indicating copy to clipboard operation
regl copied to clipboard

Alternatives to define array uniforms

Open milcktoast opened this issue 7 years ago • 3 comments

The lighting example uses key names per item'lights[0]': light0. This could become pretty verbose and cumbersome, is it planned / possible to allow passing arrays instead lights: [light0, light1, ...]?

milcktoast avatar Aug 15 '16 18:08 milcktoast

I think that syntax would greatly simplify things! Let us see what @mikolalysenko has to say.

Erkaman avatar Aug 15 '16 19:08 Erkaman

I wanted to do this originally, but ran into the problem that it is ambiguous for vec or mat type uniforms. That said, I am still open to the idea and there are probably ways to do things better or simpler here if we can resolve the ambiguity.

mikolalysenko avatar Aug 15 '16 22:08 mikolalysenko

Reopening since I believe #591 introduced a bug raised in #611 and reverted in #612.

rreusser avatar Dec 29 '21 18:12 rreusser